Forum Thread
Need help with networking solution for cross platform game (Forums : Coding & Scripting : Need help with networking solution for cross platform game) Locked
Thread Options
Aug 3 2013 Anchor

I've been sitting most of the day trying to find a good solution to use for the networking part of the game I'm developing. The game is created in Java with Libgdx and is gonna be played on android, windows, linux and mac. At least that is what we are aiming at. The problem here is that we are trying to find a good solution for the networking and are wondering if there is any good free / cheap solution that doesn't need us to host our own server at home. The game is a turn based game so there hopefully will not be alot of load on the server. We are planning on only using the server to do matchmaking, players connect to the server and the server set two people up to play with each other, they in turn connect to each other. Which spares the server from alot of the load. Ideal would also be for the players to be able to shut the game down on their mobile device when its not their turn and open it up again when its their turn again. Any help at all to solve this problem with not having to set up our own server at home would be very helpful!

Edited by: Brodal

Aug 3 2013 Anchor

A Java-capable PaaS. Random article from first page of a google search:

Sep 4 2013 Anchor

If you are doing turn based and mobile, Consider just using sockets directly.
TCPIO is very easy to use directly, its just a errorless byte stream with some lag, Like reading and writing a file really, its that simple.

Its when you code a FPS game that needs the more responsive UDP protocol that you want to get a networking library.

That said, there are a few things like serialization and data watching that a networking library can add to make your life easier.

Sep 23 2013 Anchor

If you plan on supporting it on Mobile, you can forget about players connecting directly to each other. (Unless your talking about wifi only) NAT punch through is rarely effective at all going through phone provider networks.

Either way the biggest problem you'll have in all of those scenarios is NAT punch through, I'm not aware of any Java solutions for this.

If you want a super cheap server based solution, and don't mind allowing clients to be authoritative (which you apparently don't), you can always just use a web server and something like an easy REST api and mysql database.

Edited by: Retromite

Reply to thread
click to sign in and post

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.

Got it!

We have recently updated our privacy policy and terms of use in-line with GDPR requirements. More Info?