Day & Night cycle and Dialogue

Hi, I’m new to Gdevelop and coding in general (for example, I barely know what strings and yarns in coding in Gdevelop are), but I was wondering if someone could explain in very, very simple terms. Or if they knew any videos that are helpful and can help me learn how to do the aforementioned things. Anything would help :c

regarding tutorials for a dialogue system with yarn you can find good content at youtube:

Astronaronic Dialogue in GDevelop with YARN - YouTube

The Gem Dev has an extensive tutorial which might be helpful if you can get over the subpar sound quality Dialogue Tree (Yarn) | GDevelop 5 - YouTube


Square One Tutorials GDevelop 5 #4 - Dialog Tree and Variables with Yarn! - YouTube

I have no experience with a day and night cycle but I guess other gdevelop colleagues have some suggestions.

1 Like

Oh my god thank you so much. You’re literally a life saver…I’ve been trying to create dialogue for so long so I really appreciate it :smiley:

1 Like

Hi Martha,

Since there is no suggestion about the day and night cycle so far, here is a very simple solution:

You need a timer and depending on the elapsed time you change the tint of your sprites. If you have a lot of them you can just put them in a group. You only need to take care that sprite objects and tiled sprite objects are in separate groups because they have their own tint action. If you need a smooth transition you can just change the tint gradually with the colors and speed of your choice.

1 Like

I would modify Drona’s solution to make it even simpler, the layer effect “light night” and “dark night” both have opacity settings.

Rather than worrying about object groups, I would just add the effect to the base layer (or however many layers you need), then use the timer to change between 0 and 1 in the opacity setting of the layer effect.

So, lets say, from whatever you’re counting as the timer to be “6pm”, you’d start gradually increasing from 0 until 1 at roughly, lets say, 9 pm. Then from 6 am, you’d gradually decrease from 1 until 0 at 9am. etc.


Here is an example that was submitted by @Entropy404. It is not available in GDevelop. But, it might be helpful for me. Day & night cycle using a layer effect example · Issue #2440 · 4ian/GDevelop · GitHub

1 Like