Real Time Multi-Player Library with libgdx

Anything libgdx related goes here!

Real Time Multi-Player Library with libgdx

Postby sparrow » Sun Aug 14, 2011 8:08 am

Hi,

I'm looking at trying to make my game handle real time multi-player interaction. I played a little bit with GDX remote and the performance seems good, but am looking for something that's more high level. I'm not concerned with registering users, finding users, and all that other user management stuff, that involves work, but I know how to do.

What I'm looking for is some solution where 2 devices are ready to play, and need to exchange information about what each player is doing on their device and react to it. At the most basic level, think of it as being able to convert the pong demo to multiplayer, where two players each have a paddle on their screen, and play back and forth. I'm thinking that the implementation should be a messaging queue on each device that sends information to the other one about the changes since the last message. It would handle connecting, notification when the other side is lagging, etc. This might not be the best solution so I'm open to other ideas.
sparrow
 
Posts: 13
Joined: Tue Jun 07, 2011 2:26 am

Re: Real Time Multi-Player Library with libgdx

Postby mzechner » Sun Aug 14, 2011 11:31 pm

We won't have any API like this in libgdx in the forseeable future. The networking classes in the Java runtime (Socket etc.) are more than enough to build upon.

On your actual problem: real-time multi-player can get a bit hairy. Things like real-time strategy games (C&C, Warcraft etc.) or turn based games are simple to implement. For real-time multi-player you will need to look into the following topics:

- battling latency.
- dead reckoning
- UDP

A nice starting article is http://developers.sun.com/mobility/midp ... gamepart1/ You can also look into how the pros do it: http://developer.valvesoftware.com/wiki ... Networking or http://trac.bookofhook.com/bookofhook/t ... Networking

hth
mzechner
Site Admin
 
Posts: 4879
Joined: Sat Jul 10, 2010 3:50 pm

Re: Real Time Multi-Player Library with libgdx

Postby sparrow » Mon Aug 15, 2011 6:18 am

I'm familiar with the Java networking library though I haven't used it in ages. I was hopping to be belt to use something that is a little higher level that handles timeouts, reconnection, etc. Yes, I'm aware of latency issues. In ways, I thought I'd just start by offering it for people in the same room, on the same network that want to play with each other. Then the latency problems shouldn't be as big a deal if everyone's on the same wifi network.

I guess this is too big a jump at this point. I'll focus on single player first.
sparrow
 
Posts: 13
Joined: Tue Jun 07, 2011 2:26 am


Return to Libgdx

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 1 guest