Making a RTS game #11: Adding a day-and-night cycle (Unity/C#)

On with our RTS game: today, we add a day-and-night cycle!

Mina Pêcheux
CodeX

--

⬅️ Interlude #2: Refactoring the event system| TOC | Tutorial #12: Moving character units ➡️

📕 Get the ebook and bonus material on Gumroad!
🚀 Find the code of this tutorial series on my Github!

In the last tutorial, we talked about camera placement and projections. We saw how crucial the position and properties of the camera in order to convey the proper look and feel for your game. Another essential component of this ambiance is the lighting of your scene.

Time is of the utmost importance in almost all video games, be it because it is part of the story itself (like in Majora’s Mask), because you’re required to time your actions very precisely (like in the infamous Dragon’s Lair — considered the first QTE game), because you have limited time to complete a mission (like for some World of Warcraft quests), because you need to wait for something to happen (like in Minecraft, when you want your crops to grow)…

Time might be a simple continuous countdown, or it might match some sort of day and night cycle, as we have in real life.

--

--

Mina Pêcheux
CodeX

I’m a freelance full-stack web & game developer. I’m passionate about topics like CGI, music, data science and more! Find me at: https://minapecheux.com :)