Sonic 06 - Day Night Cycle Test - 4 Day States @fishly1016
Sonic 06 - Day Night Cycle Test - 4 Day States  @fishly1016
Uploaded August 2022 | Updated December 2026, 3 hours ago
Huge thanks to Rom for making the lighting presets; I'm clueless when it comes to making those things.
While making the randomized key system, I stumbled across a function that let me track time and act on it in Lua, so I decided to test it out by setting up a "day night cycle." It's nowhere near as dynamic as the one they showed off at TGS 05 (the functions for that still seem to exist, though they're very broken), but it's still pretty neat.
This works by establishing preset lighting ahead of time in the Sceneparam file, assigning those presets to ChangeLights, then using lua functions to toggle the ChangeLights on and off as needed throughout the "day" (in this video I have a change set to occur every 20 seconds, but it's very easy to customize the length). There are 2 main issues with this system:

First, the parameters for fading into and out of ChangeLights don't work, so all lighting changes happen over the course of 1 second, making it pretty jarring. This can probably be offset by making additional lighting presets so that the change is more gradual (like going from midday to late day to dusk rather than going straight from day to dusk), but it'd be a lot of extra work.

Second, ChangeLights can't immediately transition into each other; the lighting will very briefly snap back to the default values before the new ChangeLight takes effect. To mitigate this, I made the default lighting Morning, so the flash only occurs when going from Day to Dusk and Dusk to Night (and it's not super noticeable since both of those use darker colors anyway, like the Dawn lighting), but it may pose problems if more day states are added (like to mitigate the first issue).

I don't know if this will ever see a proper release due to the high amount of effort needed to make enough lighting presets, but I thought it was worth showing off regardless. This was also a good excuse to see if 06 would let me establish state machines in Lua, and it surprisingly worked, so this system could be expanded in the future to include different routes in stages based on the time of day or maybe even weather events.
Sonic 06 - Day Night Cycle Test - 4 Day StatesAnother Physics Status UpdateSonic P-06: A Scuffed Silver Speedrun TutorialSonic 06 Restored: Mod Released! (LINK IN DESCRIPTION)Character Attribute Toggles - Proof of ConceptSonic 06 Physics ReleaseSonic 06 Super Hard: Shadow White AcropolisSonic Frontiers Speedrun: 4-3 in 3238Sonic 06 Restored: Music QuizSonic 06 Restored: Political Terrorism 2Sonic Frontiers Revisited: 1-7 in 44 secondsSonic 06 Restored: Accordion Mans Dream
Fishly 101 |

Sonic 06 - Day Night Cycle Test - 4 Day States

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER