application running in a closed state

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Vinforn

I’m a absolute newbie in Godot Engine and don’t know much, but I’m already trying to make a small clicker. I need points to be accrued even if the application is closed. is it possible?

1 Like
:bust_in_silhouette: Reply From: jgodfrey

Your game can’t do anything if it’s not running…I assume you want the points to accrue based on time passed?

In that case, I’d recommend you do something like:

  • Upon exit of your game, store the current system timestamp
  • Upon start of your game, retrieve that stored timestamp
  • By comparing that stored timestamp with the current timestamp, you can calculate how much time has passed since the game was previously closed.
  • Based on that, accrue the points as necessary.
1 Like