Is it possible to use 3G internet for a TCP/IP game server?

Posted by Amit Ofer on Game Development See other posts from Game Development or by Amit Ofer
Published on 2012-02-18T10:23:31Z Indexed on 2012/03/19 18:15 UTC
Read the original article Hit count: 231

I'm working on a turned based multiplayer android game with a friend. I started working on the game server and client using socket programming. I found a few tutorials on how to implement a basic chat on android and I started extending that example to suit my needs. Basically the game is really simple and the communication only include sending a few string from the client to the server every turn and sending the calculated scores back to all the clients after each turn. the idea is that one of the players creates the game and thus initialize the server, and each player connects to this client using ip. I tried this solution and it seems to work great when all the players are using the same wifi connection or by using router port forwarding. The problem is when trying to use 3G internet for the server, I guess the problem is that 3G ip address isn't global and you can't use port forwarding there, correct me if I'm wrong here.

Is there a way to overcome this issue? or the only solution is to limit my game to wifi only or think of a different solution than the standard socket programming solution? I.E web server etc.

what do you think would be the best approach here?

Thanks.

© Game Development or respective owner

Related posts about android

Related posts about multiplayer