Forum BigDB How and When to save an Object?

Discussion and help relating to the PlayerIO database solution, BigDB.

How and When to save an Object?

Postby zapleaf » May 31st, 2014, 8:49 pm

I am just curious if I am saving player data correctly. I have issues with my game not saving player stats correctly and they end up losing a lot of hours of progress. My problem is this:
- Players who play for long periods of time (2+ Hours) will lose ALL their stats they gained while playing the game (MMORPG)
- I added in an auto save features that saves stats every 15 minutes.
- The game only saves when the player signs out (Leaves a room) or the auto-save (15 minutes) is fired.
How my system works:
- Players sign in and a player class is created with all their information (Stats and stuff)
- As they gain stats the player class is adjusted accordingly.
- Once the player leaves the game (Player Leaves) the game loads in their Object, and overwrites it with their new Player Class stats.
I would LOVE for a pro to look over my code and see if I am saving the game correctly or not.
If this does not make enough sense ask any questions you need to! :D
zapleaf
 
Posts: 16
Joined: August 13th, 2013, 12:31 pm

Re: How and When to save an Object?

Postby Henrik » June 2nd, 2014, 7:49 pm

How often does that player class object change? Every second? Every time they kill something? Every few minutes?
Henrik
.IO
 
Posts: 1880
Joined: January 4th, 2010, 1:53 pm


Return to BigDB