Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I've started to design a commercial Client/Server game in Unity and I need server-side saves players data for later analysis and web consultation (like battle.net). Is there a best practice to achieve this? Can I use MongoDb for a commercial game?

share|improve this question

closed as off-topic by Josh Petrie Sep 29 '14 at 15:46

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions about "how to get started," "what to learn next," or "which technology to use" are discussion-oriented questions which involve answers that are either based on opinion, or which are all equally valid. Those kinds of questions are outside the scope of this site. Visit our help center for more information." – Josh Petrie
If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer 1

up vote 1 down vote accepted

I will only answer to your first question (as I don't have a clue about MongoDB + commercial game).

Unity3D has a set of classes to communicate through HTTP. They are not perfect but they exists and (usually) work.

Have a look at WWW class, to set up a connection, and also at WWWForm to send requests and data to your server using HTTP.

Once your game will be able to read and write data via HTTP you will have to write the server side logic to save this data into your database.

Note that it's also possible to communicate through C# classes such as System.Net.WebClient, if you need to use commands not allowed by Unity WWW, such as PUT.

I hope it helps.

share|improve this answer
    
It can be the right direction! Server can call a WebApi project throught http calls but what about performance? –  danyolgiax Sep 29 '14 at 18:27
    
Well about performance,as for local ones, online data saves have to be done during not too critical game phases. So performances will really depend on you. Note that it's better to use www in a coroutine to not lock the game execution. Normally performance of your game won't be affected. –  lvictorino Sep 29 '14 at 18:36

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