In a real-time game it is better to send at intervals. Otherwise, how do you deal with "when it moves"? When the positional value changes you send a message? If you are constantly moving you could be sending thousands of messages a second depending on the frequency of updates in your game or however you are dealing with this. Intervals are really the only way you can keep traffic to a consistent level as well as giving your network a consistent flow that keeps the game from getting jerky when lots of stuff is going on and really smooth when nothing is going on. If programmed well you'll have a consistent flow throughout.
I would recommend taking a look at the synchronization system in JGN that provides exactly this:
http://svn.javagn.org/core/trunk/src/com/captiveimagination/jgn/synchronization/
For an example in jME that uses a synchronization implementation and allows multiple connected clients see here:
http://svn.javagn.org/synchronization/jme-networking/trunk/src/com/captiveimagination/jmenet/
The "flagrush" is an example based on the FlagRush tutorial in jME. As you can see from the JMEGraphicalController it is trivial to create implementations for other systems to allow JGN to work with them.
For more information on JGN see:
http://www.javagn.org
I would recommend taking a look at the synchronization system in JGN that provides exactly this:
http://svn.javagn.org/core/trunk/src/com/captiveimagination/jgn/synchronization/
For an example in jME that uses a synchronization implementation and allows multiple connected clients see here:
http://svn.javagn.org/synchronization/jme-networking/trunk/src/com/captiveimagination/jmenet/
The "flagrush" is an example based on the FlagRush tutorial in jME. As you can see from the JMEGraphicalController it is trivial to create implementations for other systems to allow JGN to work with them.
For more information on JGN see:
http://www.javagn.org
Thanks for the info,
By the way, can anyone help me by giving me which are the best time rates to send info (every ? milliseconds)




