That’s a very interesting question!
For an FPS where the landscape is static and the player controls just one character and not vehicles or anything, probably the best way to do it is a custom solution where you send raw byte arrays over TCP which have info like:
world timeStamp
player position
player direction
and these can be sent whenever direction changes, as well as just for an update say 5 or 10 times a second. You’d also send a byte array with info when a player changes state such as picking up a gun.
But such custom methods are pretty hard to do in practice, since without sending the whole game world from the server to all clients, the clients inevitably get out of sync. This can happen just from floating point error. It’s also extremely hard to code a completely deterministic world where clients and server do exactly the same thing - AI, randomness, etc become pretty difficult. But, Kev Glass does it well in his games - MiniMotox uses a clever system similarish to what I described above (I think!)- but besides the racing trucks, the world is static.
The demo game I posted up (http://www.java-gaming.org/forums/index.php?topic=18019.msg141395#msg141395) has got a couple of neat features which allow you to forget about all of the sync’ing and byte-array construction of data. The whole world can be serialized and sent to all clients, and the world can be re-wound so the server can go back in time to apply a lagged client event. While the sample game worked pretty well (it ran for months on Riven’s internet server without any problems), the code is undocumented and it is not a pluggable frame work at all - you’ll have to start with the demo game and carefully graft your own code on which wouldn’t be the funnest thing. One day I’ll try and fix it up, for now I just want to use it.
Good luck with your project. Incorporating network play is pretty hard so don’t be discouraged if you find you need to completely re-design the way your game currently works.