Webservice/Client architecture help needed

Started by
2 comments, last by hplus0603 10 years, 4 months ago

Hey guys...working on my first game and was wondering if I could get some feedback on what I was planning on doing with the mutliplayer setup for my turn based game.

I was thinking about using StackMob as my backend but writing a .net webservice wrapper around the Datastore API that provides additional functionality such as matchmaking and other features that require custom code.

On the client side, I was thinking about having the clients contact the webservice for matchmaking and then have the clients communicate directly after that. In addition to broadcasting each turn to the opponent's client, the service will also receive a copy of the game state after each turn is made and will validate the turn to make sure no funny business has happened. After receiving game state from an opponent, the client will contact the service to make sure that the turn is valid.

If the connection between the clients is broken for any reason, the game can either be continued when both clients connect again, or be played turn by turn, each player being notified either by push notification or email.

Does this sound about right? Thanks for helping out a noob :)

Advertisement

What is the "connection" you're talking about?

If you use web services, then those are individual HTTP requests, without a connection.

enum Bool { True, False, FileNotFound };

What is the "connection" you're talking about?

If you use web services, then those are individual HTTP requests, without a connection.

The connection between clients will be a socketed connection.

Direct client/client connection without also using direct client/server connections will not make it possible to build NAT punch-through, and thus will only work for clients that do port forwarding.

A better option (for connectivity) is to have clients post their turns to the server, and have it provide the data to the other client on demand. Perhaps with some push notification (socket.io / websockets, or whatever.)

enum Bool { True, False, FileNotFound };

This topic is closed to new replies.

Advertisement