I need system save to save on exit of game (+local storage questions)

0 favourites
  • 3 posts
From the Asset Store
Basic Plugins for Firebase Authentication, Realtime-Database, Firestore, Cloud Storage
  • I'm making an idle game where blocks fall from the sky and you must grind the blocks to earn money.

    I tried using localstorage, it worked well for saving the players income.

    The issue is I can't figure out a way to save the position of the blocks using localstorage. Thrre will be a ton on screen, how can I save the position of all of them?

    I found the system save works perfect for this game except I need the game to save every tick. The problem with this is that's very laggy.

    Saving localstorage with every tick was much smoother but I can't find a way to save positions of mulitple instances of the same objects as well as their instance variables.

    Can I just use system save on exit to consistently save progress? Or maybe someone can point me in the right direction for the localstorage dilemma I face.

  • Saving on every tick is an overkill. Even with Local Storage this may cause lags on some devices. Also, the game may run at 240 fps, why would you need to save 240 times per second?

    I suggest saving maybe once ever 3 seconds or so, this should be more than enough. And instead of saving positions of all blocks just re-generate them randomly when the game is resumed.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Saving on every tick is an overkill. Even with Local Storage this may cause lags on some devices. Also, the game may run at 240 fps, why would you need to save 240 times per second?

    I suggest saving maybe once ever 3 seconds or so, this should be more than enough. And instead of saving positions of all blocks just re-generate them randomly when the game is resumed.

    I'm going to give this a shot, maybe add a manual save as well. Thanks! I'll also try the localstorage trick if it comes down to it.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)