LWJGL Forum

Programming => General Java Game Development => Topic started by: jam007 on February 01, 2005, 14:50:06

Title: Multi-user
Post by: jam007 on February 01, 2005, 14:50:06
Hi

IÃ,´m making some progress in my game devevelopment and have started to think about the future...multiuser. The thing is i havenÃ,´t more than tried som basic network classes from the Java tutorial so far and are therefore more than a bit lost when it comes to designing this part.
Could anyone direct me to a source of info about the network part of a multiuser java game. Tutorials, examples and thoughts on the subject...
(IÃ,´v tried searching the web and javagaming.org without any great result,  IÃ,´v probably missed something...)
I would like to transfer some basic data like position between players.

Anders

PS It is (or will be) an open source Ice Boat game in 3D using LWJGL. I just moving to sourceforge.net
Title: Multi-user
Post by: princec on February 01, 2005, 16:02:45
It's pretty difficult stuff, networking is. Its fundamental design is radically different depending on:
amongst other things. So firstly ask yourself about those three questions.

Cas :)
Title: Multi-user
Post by: jam007 on February 01, 2005, 20:17:53
thanks for the reply

1) realtime 3D
2) Im thinking of  having a server running that people can log on to to play having clients in the game.
3) 2-20 concurrent users would be a realistic guess.

IÃ,´v read about and tested som examples of Javas RMI, would that be useful? Having a List at the server and clients invoking a get and set methods to retrive and place current info.

Anders
[/quote]
Title: Multi-user
Post by: princec on February 02, 2005, 10:44:10
RMI is a very high latency, high level protocol, and it's totally unsuitable for realtime. For fixed turnbased games it'd be ideal, as these are very like the normal business software client/server model.

You could sensibly use RMI for your lobby server though to manage setting up games and logging in / out.

However your realtime protocol will have to be TCP/IP or UDP/IP sockets. With <20 clients you can probably get away with using normal sockets and IO, although you might want to investigate using the new javax.nio package for maximum performance.

Depending just how realtime you need the game, you might have to axe TCP/IP and go for UDP, which involves writing your own TCP-like protocol over UDP. It's not particularly hard but not particularly easy either.

Cas :)
Title: Multi-user
Post by: jam007 on February 02, 2005, 11:00:46
Thanks for the advise. I will investigate futher... now I know a little more where to look.

Anders