views:

43

answers:

2

I've done a search on SO for this topic and have found similar questions, though none seem to address my specific concerns.

I'd like to experiment with building a turn-based, eight-person multiplayer iPad game. For this, I'll need to build a game server that manages all the different games being played at any given time. The backend for the game server will be an SQL database.

To implement the game server, I'd like to build it using .NET since I'm the most comfortable with the Visual Studio 2008 IDE and .NET MVC framework. My other goal in all this is to get some experience with some of the more modern network programming APIs being used in .NET applications, so I'd prefer to build this game server from scratch rather than using any existing open source projects. That all said, my questions are...

  1. Which .NET APIs and Frameworks would work well for implementing the a)networking side, b)game logic, and c)SQL database logic of a game server that receives requests from an iPad app and returns the requested data?
  2. I've read that JSON and XML are the preferred data format for this kind of data exchange, your thoughts?
  3. Since I'm not implementing a web page server, it doesn't make sense to me to use the MVC pattern for the purpose I understand it to serve, unfortunately it's the framework I have the most experience with and so I can't help but think of everything in terms of MVC. But it seems to me the MVC pattern would work fine since I'm returning JSON or XML instead of HTML (which is just a subset of XML anyways). Is the MVC framework an obviously bad design pattern and framework to consider using for this?
  4. Just to get started, what are some quick approaches to implementing a simple .NET-based server that can receive a query from an iPad app and return a simple piece of JSON or XML data?

Thanks so much in advance for all your help! Please feel free to answer as little or as much of my long question, any and all help is appreciated. I'm going to continue researching this topic right now!

+1  A: 

HTTP is probably overkill for the operation you are running here. But i the iPad environment deals trivially with calls to JSON/XML webservices then just do that. It will be quite simple really (well, that part). Your main problem is designing the way in which the local game interacts with the server. But that's for you to figure out.

If it were me, and the API's in objective-c or whatever were trivial, I'd go with an XML format. Even if they were slightly non-trivial I'd go with that.

If, under load testing, you determine that the amount of requests you need to handle can't be served by this model, then change to a binary socket-based system. But I'd think you'd be well under the limit of connections and processing needed to change to that sort of model.

Noon Silk