0
\$\begingroup\$

I have a mobile game written in XNA/MonoGame with a wcf server and I am currently designing the head to head competition mode. Previously I have created a game that used UDP to set up communication between several clients(one of which acts as server and client) over WiFi but now I want to be able to set up a game between players over the internet. Utilizing the wcf server, I already have methods which allow a player to indicate that they are looking for a game, retrieve a list of other players looking for a game, and indicate that they would like to initiate a game with one of those players.

What I want to know though, is what is the best way to transfer the connection info from one client to the next so that they can directly connect to one another or whether that is actually a good/necessary idea or not. The game only needs to send a list of words from one client to the competitor initially and then send/retrieve status updates every few seconds of how many words have been completed until one of them gets x number of words ahead.

Obviously a direct connection would allow a much tighter window of response to determine when someone has won but really Its not a first person shooter so some flexibility is ok. However, utilizing the server and database to determine each players state can theoretically add a lot of lag especially if there is a lot of load on it.

I haven't set up any push notification for the mobile client and besides the server itself does not have a main loop that would allow it to push out updates, it basically is a front end for access to the game database.

Hopefully I haven't been to vague or general, but I really am looking for suggestions as to where I should spend my effort without having to reinvent the wheel or go down some path that inevitably wont work/cause unforeseen problems. If anyone has a good reference for this that would be appreciated as well.

\$\endgroup\$
4
  • \$\begingroup\$ are you concerned about players manipulating clients to send false information? Without a server maintaining game state you won't be able to guarantee fair play. \$\endgroup\$
    – georgek
    Mar 17, 2013 at 21:45
  • \$\begingroup\$ Since it is a mobile client(windows phone) I believe it is unlikely that there will be manipulation like that but perhaps I am incorrect in that matter. I am more concerned about what the security repercussion of transmitting and temporarily storing the info that is necessary to connect two devices together. \$\endgroup\$
    – RobCurr
    Mar 18, 2013 at 1:44
  • \$\begingroup\$ Man in the middle attacks are a concern here. If you use a level of security on the client to client connection, you won't have too much to worry about though. The clients might need to initiate security on initial connection to the central server, which is used during the client to client connection, ie, the exchange happens from the server, and not the clients. The security layer should be in place before the clients connect. \$\endgroup\$ Mar 18, 2013 at 5:40
  • \$\begingroup\$ Assuming I have an https connection between my client and server and would enable a level of security between the 2 clients once the connection is made, what minimal information should I be passing from client A to the server back to client B in order that they can initiate a direct connection. Considering different network setups, firewalls and such. \$\endgroup\$
    – RobCurr
    Mar 19, 2013 at 19:16

0

You must log in to answer this question.

Browse other questions tagged .