Advertisement Jump to content
Sign in to follow this  
ate50eggs

Webservice/Client architecture help needed

This topic is 1876 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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 :)

Share this post


Link to post
Share on other sites
Advertisement

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

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

Share this post


Link to post
Share on other sites

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. 

Share this post


Link to post
Share on other sites

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.)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!