DataInput vs. ByteArrayInput, and more...

I am converting a mud server to send data for a very simple, real-time 3rd person shooter. The max game board will support 16 players(8 to a side) I need to send location data, and projectile data to the clients.

Which is prefered…?

(acutally 2 questions here)

  1. server loops thru all players every 30 millisecs(or so) and on each player loop thru all players sending location data or what?

  2. use a DataInput(Output)Stream or ByteArrrayInput(Output)Stream or what?

apologiies for the vagueness.

M

should the client only send data to server when it makes a move ore on a continual basis thru a thread loop.?

I am trying to smooth out my motion on data returned from the server.

ok, should I use behaviors to make moves after data comes from server or just run the transform after each piece of data from server is collected?

Also, how can I capture the radians as a double from an existing TransformGroup?

I can get the x, y and z, but since I am using DataOutPutStream(for now) I need to send the angle as a double.

M

[quote]should the client only send data to server when it makes a move ore on a continual basis thru a thread loop.?
[/quote]
It really depends on the kind of game. If fast action is required, a loop may be better, because sometimes the network isn’t working optimally, then if a package sent to one client is lost on the way, the client might not know something is happening, but the loop will send update info soon so the client will catch up even after a network clitch.

If you use a protocol that assures everyone gets every package of information before the action continues, you can do it without the loop.

Maybe you should implement both and try them out, which one actually works faster when YOU have done them? Such different modules mean a bit more work, but not much compared to all the other work you’re going to do on the game, so it might be a worthwile learning experience for you to try them both.