2

What are your thought about saving data (such as character stats, achivements, items) on a MMO game? Clearly you want as little dataloss as possible if(when) the server goes down for some reason.

  • Saving the character whenever something important has happend? Seems jumpy, performancewise?
  • Saving everything once very X Hours? Causes a few seconds freeze, but could be accompanied with a nice "The world is saving"-message.
  • Maybe having a save-timer for every character, where you queue the character for saving every once in a while, and the server works on this queue whenever it is not busy?

Out of these three i think the last one is a pretty good solution, but i might have overlooked something. But what are your thoughts, how are the "big boys" doing it?

2
  • 4
    You might want to post you question on: gamedev.stackexchange.com
    – user142162
    Jan 28, 2011 at 20:50
  • ACI (no D) in memory and some background threads flushing the states to some D (like database)
    – bestsss
    Jan 28, 2011 at 20:57

4 Answers 4

3

Saving the character whenever something important has happend? Seems jumpy, performancewise?

Not in the least. Compared to everything else that has to be done for such a game, this is utterly trivial. Any decent database engine will handle that. That's what they're built to do.

1
1

I would use a write-through cache for my database. Most aspects of a character don't change very often. Those that do, like position, already require some pretty heavy engineering to keep coherent across servers and clients.

1

maybe make a sort of cache server. game server would send read/write requests to cache server, cache server would write/read stuff from db and send back to game server. this way if certain query gets laggy it wont stop thread in gameserver, if server goes down - cahe server will still have cached data and save it if not saved already.

0

I wrote this http://onemanmmo.com/?doubleentry while solving how to record microtransactions and guarantee they survive a server crash for my game. The article is on using a double-entry accounting database schema on top of MySQL with some info on stored procedures and security.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.