What type of Networking should i use?

Hi,

I have created a game arena using Xith3D (a terrain game world). I can add a MD3 model to the arena and fire projectiles. I have also implemented a quake style keyboard / mouse look system.

Basically my avatar is created using two vectors - one for the current position and one for the current direction you are facing. Each projectile is also made up of those two vectors, I create a new vector to sotre the target position (ie target.sub(currentDirection, currentPosition) then I use a while loop to make my projectile move in the direction it was fired.

I would like to play the game over a LAN (just with 2 clients to begin with). I would like to keep things as simple as possible, all i really need the server to keep track of is both players position/direction and the same for when a projectile is fired. Is this the correct way to go about things?

I have some experience with java.io. What kind of network architecture should I use / look into using?

Any suggestions much appreciated…

Cheers.

Strongly suggest NIO…it’s easier than IO (and, theoretically, faster…although for small games you may never notice the difference - your bottlenecks are likely to be elsewhere).

Take a look at the NIO articles on JGF for a start - http://grexengine.com/sections/externalgames/ - whilst the series on NIO is not complete, the first few that are up should be enough to get you most of the way (I know of about ten people who’ve managed to get their NIO game working on those alone…).

sweet!

I’ll take a look - thanks for te input :slight_smile:

HeadQuarter has a ready to go server module specialized on keeping track of positions. It’s based on NIO, as blah suggests. Maybe its not the ‘as simple as possible’ way to start, but it’s proven to work :slight_smile: