Fixed lighting

This commit is contained in:
2025-12-16 09:13:22 -07:00
parent de5f47f47b
commit 32df388c77
6 changed files with 85 additions and 66 deletions

View File

@@ -10,8 +10,20 @@ import (
func CreateDesert(screenWidth, screenHeight float64) *Map {
m := NewMap("desert", 2, "Desert", screenWidth, screenHeight)
m.BackgroundColor = color.NRGBA{R: 15, G: 20, B: 40, A: 255} // Dark blue night sky
m.TimeOfDay = Nighttime
m.BackgroundColor = color.NRGBA{R: 15, G: 20, B: 40, A: 255}
m.Lighting = LightConfig{
AmbientBrightness: 0.1,
Sources: []LightSource{
{
X: screenWidth - 80,
Y: 80,
Radius: 450,
Color: color.RGBA{R: 200, G: 220, B: 255, A: 255},
Intensity: 0.5,
ShadowDarkness: 0.7,
},
},
}
// ground surface
m.World.AddSurface(&world.Surface{