So, just laying here thinking about what I want to add to my game, and I decided on a day/night cycle that runs in real time. The enemies in my game get their power from darkness, so places below the surface are where they are strongest. However, for the surface, I wanted to add a cycle so at night, they become harder to see and only their eyes and veins glow. I was going to do this by having a timer tick filter 60 seconds into 1 minute, and at 00:00, 7:00, 12:00, and 20:00 every single object would play animations for midnight, sunrise, noon, and sunset, by getting messages from the clock.
This may be a massive lag issue.
All objects would need to receive messages, every single tile and enemy. I would hate to make sprites for the player as well just for night so maybe I'll alpha blackness on the GUI.
Is there a better way to do this than have every single object in the level constantly receiving time update messages? They would have to receive them constantly, because off screen objects wouldn't update from messages. I'd be setting filters for greater than -1, 6, 11, and 19 which filter to 0, 1, 2 and 3, constantly sending out a message so all objects to set that number so they play the right animations for day and night.
I'll do some testing today for lag, but I want to know if there's a better way to do this than constant messages.
background animations would be very necessary for setting the sky colors and transitioning from sky to stars.