Restoration attempts

Hello! I can not understand how you can do to attempt restoration the background. For example, in the game I have 5 lives, when they end the more I could not continue. How can you make that life restored in time, every 30 minutes. Life must be restored, even when the game is closed. Thank you!

What you’re asking for is the typical free-to-play system where a player only gets to play a certain amount before they have to log off (or pay), right?

You’ll need an online server for that. You can’t run a timer when the app isn’t running (even if you could, it wouldn’t work if the platform you’re running the game on is turned off). Checking the system time isn’t a good option either, as users can change that.

The player would have to be logged into your server to play, and your server has a user profile for that player, and would tell the game if it’s allowed to play or not.