playMaker

Author Topic: How many times and when do you save a player's data?  (Read 1200 times)

Broken Stylus

  • Beta Group
  • Hero Member
  • *
  • Posts: 773
How many times and when do you save a player's data?
« on: November 23, 2020, 03:04:16 PM »
A rather general question but I found that using Easy Save creates hiccups when data is saved so I proceeded to limit the amount of savings to key moments in the app, including right when quitting. Obviously the less frequent the savings the riskier it is to lose all the player's latest actions, including spending real or virtual money.

So where and when do you usually save a player's data inside a game?

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: How many times and when do you save a player's data?
« Reply #1 on: November 23, 2020, 04:45:32 PM »
Hi.
Where and when is very depending on your game.

For example if you would have a vendor where you can buy/sell stuff
after buying / selling something would be a good place to save.

Pausing the game can save.

Going to main menu / exit game.

Maybe on certain check points.

Fat Pug Studio

  • Beta Group
  • Hero Member
  • *
  • Posts: 1294
    • Fat Pug Studio
Re: How many times and when do you save a player's data?
« Reply #2 on: November 24, 2020, 02:08:29 PM »
Depends what are you saving, i have no hiccups with easy save.
Available for Playmaker work

Broken Stylus

  • Beta Group
  • Hero Member
  • *
  • Posts: 773
Re: How many times and when do you save a player's data?
« Reply #3 on: November 25, 2020, 03:59:00 PM »
Depends what are you saving, i have no hiccups with easy save.

That's interesting, I got some bumps in the editor and they were noticeable enough that I had to avoid saving data at runtime. Like a player's forever growing amount of virtual money for example. I still need to fine tune this project and try to increase the amount of saving as often as possible.
« Last Edit: November 25, 2020, 05:38:59 PM by Broken Stylus »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: How many times and when do you save a player's data?
« Reply #4 on: November 26, 2020, 06:05:54 AM »
Hi.
Saving every frame would definitely not be a good idea.
Also if you would pickup multiple coins in a short timeframe i would not save after each pickup.

I use Application quit to save and so far that works great.
One case it would probably not work is if the device would be shut down in a hard way (like a power shortage)

Broken Stylus

  • Beta Group
  • Hero Member
  • *
  • Posts: 773
Re: How many times and when do you save a player's data?
« Reply #5 on: November 26, 2020, 09:50:37 AM »
Yes, or if phone meets wall.
But other than that it's quite the rule I follow, trying to find pauses in the app activity to do the saving.