Real Time Clock (For mobile games)


#1

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.


#2

Hey,
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.


#3

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