MMO Saving Information

Hello all, I have a few questions that I’ll roll up into 1 post here.

For the related questions, we’ll use a multiplayer example game such as “Battlefield” or “Call of Duty” - Standalone.

  1. When trying to record experience, kills, ratios etc… What is the best and or easiest way to store this information? Is this information stored in a database (on the server) that is created with the “user id” to be called and referenced during game-play continuously?

  2. When the scripts are written to store and locate the information, is the scripts to do so coded on the players controller? Example. Each time a bullet hits its target, a check is made to see what type of target, what points are awarded, and then determines whether to add that portion to the database. And for this example, this script would be on the bullet itself, or the controller?

  3. Should I write 1 script (that rests within the bullet) that calls 1 larger script that checks all of the awards and points and damages etc? That script then awards the points to the proper databse ID in its correct location?

  4. When I create such database, do I create it now, that way Unity has something to reference and for debug purposes, or must I have it all up and online first?

My terminology is a bit whack I understand, but the logic i “think” is there :slight_smile:

Thanks all!

  1. It’s considered best practise for all of this information to be stored on a database hosted somewhere on a server. Never trust any data that is store on the users machine, since it encourages “tinkering”.
  2. What you describe could work. Or you could have a “stats” game object that you have a script on that handles all the communication with the server, and all the various game elements call into it to update stats.
  3. Really up to you.
  4. I’d create the database now and host it somewhere so you and all your team members and all your testers can get started. If you are working on an MMO then the networking side of the project will be the biggest single challenge that you have. Presumably you are already talking to companies who provide MMO style network solutions, so will need to start planning the server infrastructure you need. The stats database will be a tiny part of the solution I would imagine.

Using a scalable no sql database like MongoDB or Riak is highly recommended.
We also have an article on how to choose MMO technology here