Uriopass / Egregoria

3D City Builder without a grid
http://douady.paris/blog/
GNU General Public License v3.0
1.52k stars 52 forks source link

Day/Night cycle #32

Closed Uriopass closed 4 years ago

Uriopass commented 4 years ago

Time is important, and one of the easy way to show time passing is having a day/night cycle.

What I'm thinking for a basic one is to have a post-processing shader taking a list of light sprites to multiply with the actual screen color.

image

Would look something like this.

I also need to upgrade the TimeInfo struct (rename it to GameTime probably) and add useful helpers like time-of-day, date, seconds_until etc.

Uriopass commented 4 years ago

got some lights working:

image

Now I just need to have realistic sky color and a nice transition.

Uriopass commented 4 years ago

https://streamable.com/p8udac

Good enough for now :-) (But might be tweaked as I use this like the rest)