I'd like to build an iPhone game for the Game Center and am currently researching the server part of it all. I learn best by example and I'm having a hard time finding any examples of simple game servers that demonstrate...
- How data is formatted and sent to the server and how it is received
- How to authenticate the data that is being sent/received to avoid players cheating, etc.
- How the game server code is structured along with the DB
I'd like to build the game server using Ruby on Rails, though I'll settle for any examples using any framework just to understand how these concepts work. Does anyone know of any books or online resources that has covered this or shows some example code on how to build a game server?
I would have to think that most multiplayer games on the iPhone require a gamer server, yet I can't seem to find any resources that discuss how to build one. Ever resource I find that discusses building multiplayer games (including Apple's docs) says the same thing, "Developing a game server is outside the scope of this book, but we’ll focus on the client side code necessary to connect to such a server."
Thanks so much in advance for your help!
EDIT: A few more details about what I'm trying to accomplish...
I'm trying to develop a two player (possibly more) game that where the users compete to solve a puzzle faster than the other player. Match making will be handled by the Game Center, but I'll need a game server that will start/manage the games and store the results in a DB. The overall process will be something like...
- Game Center pairs up two players
- The player data is sent to the server to initialize a new game
- The start of the game is synchronized by the server
- The game starts and each player attempts to solve the puzzle
- When either player finishes, the server is notified
- As soon as both players finish, the server responds with the results and the results are stored on the server.