NaNo Day 3 — Project Life: Time and Day/Night Cycle
Something completely different but absolutely crucial to the type of game I’m aiming to make, and that’s time and days.
To start with I created some global variables in order to store time, day, month and year (plus two timers (time and sec)) I then started on the rules which actually turned out to be quite straight forward.
I spent a while searching for tutorials on YouTube, but none of them was really what I was aiming to achieve, so I ended up figuring it out by my self.
Where I needed some help was the actually initial but of counting seconds; using just variables and no actual scene timers wasn’t working.
Thanks to Whatever Games and their tutorial on creating a timer that wasn’t dependant on framerate
Next, I wanted to make a start on Day and Night Cycle now that I had a working time, so I experimented with Lighting layers which didn’t seem to work.
I liked the idea of a sun object moving across as the day rolls on, so I added a light to the scene and wanted it to move from a to b.
Thanks to Wishforge Games for their tutorial on how Tween works.
I then added a test object to follow the same route that the light was taking and that did work, so it’s basically something to do with the light not rending. First, of many bugs which I’ll need to fix!