Archived

This topic is now archived and is closed to further replies.

[java] multiplayer in sync

This topic is 5012 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

At the moment i an using sockets and writing to output to develop a fast paced game with Java3D over a network. How do you synchronize the action on all of the players screens using this, or another method?

Share this post


Link to post
Share on other sites
You need to write it as client/server. The client sends input to the server, then the server processes the input and sends a state change object back to all players connected. Every now and then you might also want the server to sync everyone, by sending a complete state object. Since everyone will be playing the same level, at its simplest, the only state changes will be players moving. Even if you have lots of objects like weapons and ammo, you only send anything on those if their position changes.



First make it work, then make it fast. --Brian Kernighan

The problems of this world cannot possibly be solved by skeptics or cynics whose horizons are limited by the obvious realities. We need men and women who can dream of things that never were. - John Fitzgerald Kennedy(35th US President)

Do not interrupt your enemy when he is making a mistake. - Napolean Bonaparte

Share this post


Link to post
Share on other sites