Day/Night cycle

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.

Also @grazer background animations would be very necessary for setting the sky colors and transitioning from sky to stars.

Back when I did that terraria based game, I wanted a sun and moon in the background, but because background objects dont have behaviors, I couldnt

Why dont you have a screen covering shader object in the GUI, and use Saves to hold the time, that way you can pick up where you left off. Just an idea

That’s what I was doing @CrimsonBlackGames. The idea is that from the beginning of the game, to the end of the game, it tells you how long it took you to beat the game, like Metroid. Additionally, when you meditate with full health, time zooms by faster, in case you don’t want to fight stronger enemies at night, or want to skip to an event that happens at a certain time of the day, rather than wait in real time.

hey man, can you help me and mine class group? we’re from Brazil, and we are trying to make a cycle of day and night, can you say to us how to do it?

You can add a single object in the user interface that gives itself different tints depending on the time, which will naturally make the objects change colour. But with the glowing eyes and veins, you would need to create a new set of animations that only play within a certain distance of the player.
Edit: This post was made in 2017, I just read that. But hey, useful information for anyone coming by

Hi @HenrySpot, there are many ways to make a day and night cycle and more information would help, and this post is from 2017.

Could you create a new discussion with more information on how you want the day and night cycle to work and also with a link to the game. From fades, color correction and shaders, there are multiple ways for this to work that also depends on the game thats trying to achieve it.
Below are a few links with the idea.

Mhx Air’s example:
https://flowlab.io/game/play/1190244

My example:
https://flowlab.io/game/play/1340930