Real Time Clock (For mobile games)

Hello everybody! I’m thinking about working on a side project for mobile.
However, this project idea requires a real time clock.
This clock is kinda like Candy Crush’s life system. If you run out of lives, or even lose 1 life, a timer starts. When the timer expires, you gain 1 life back. The main gimmick of this timer is that it is ALWAYS counting down, even when the application isn’t opened. This allows players to close the application when they run out of lives, and then return later with some of their lives refilled.
This is also for reward systems. For example, there is a button you can press to get a free reward, but you can only push it every 30 minutes or so.
So, is something like this possible in GDevelop 5, and if so, how do I make it?
Thanks in advance.

The game won’t count if it’s not opened (which makes sense), but it doesn’t matter, because you can store the time before the app is closed, and load and compare at the next opening to compute the changes.


Could you please show a working example, it would be very useful.

1 Like

Hey, Did you make it successfully?
Or can someone show an example or explain how it works?
Thanks :slightly_smiling_face: :pray:t5:

Did anybody got the solution for this? I need it too.

Please elaborate more on this process. Like how do we actually do it? Storing time and all those things?

Here is a video demonstration, most probably the solution as of now: