Day/Night Cycles! I had always known I would implement day/night cycles in Zity as it just fits with the theme, similar to Minecraft, Terraria, Day Z. I had done some early theory-crafting about how I could implement them but never really touched any code for them. Today however I gave it a shot.
They currently work on a couple of easily modifiable variables that hold information on how long each day is, when the sunsets start/end, when the night starts, and when the sunrise starts/ends. The result is a very smooth looking transition from bright as day to dark as night. In the video below you can see the entire transition in 30 seconds.
(The passage of time. Check out the zombies too.)
Another quick accomplishment was the addition of the 'searching' state in the zombies' AI. Zombie will now move towards the target's last known location before going idle. You can see this in the video in how the zombies follow me around corners even though they can't see me. If I managed to get around two corners they would simply go Idle. I'll be improving this as I add more states. Next up is that after zombie move to the last known location, they continue on in a semi-intelligible search for several seconds before giving up and going idle.
No comments:
Post a Comment