Sign in to follow this  

Data storage on server

This topic is 4304 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi all, I am currently programming on a client-server game. There is a great amount of data like attributes to store, so I decited to manage it with MySQL. Programming with it is not the problem, but whats the best way to store the data while a player is playing? Is it better to load the playerdata in some kind of structure or should all go over the SQL? For example: Is it good to load every time I need his healthstatus (for combat, healing,...) from the database or is it better to load the data only once and then store it somewhere(within an array or a struct)? Hope you are more experienced with situations like that.

Share this post


Link to post
Share on other sites
The database is a LOT slower than main memory. However, the database is durable.

Thus, typical designs will load the data once, and then mutate it in memory, check-pointing back to the database at opportune times. "opportune" can mean different things -- every 10 minutes of play time; everytime you loot a mob; one player per second in round-robin fashion; the approaches vary.

Share this post


Link to post
Share on other sites

This topic is 4304 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this