Hey guys,
im making a…GASP game, and I need to send advanced info through the network. For example I would like to send an object of the type “Player” so that the client only needs to draw it and that’s that. This would mean sending a position-vector, velocity vector, current frame of animation and/or other things.
How would I go around doing this in a way so I wont have to write tons of code to convert between serverside and clientside information?
I have some kind of idea that the Serializable interface might come in handy, meaning I would have to implement it and find a way to serialize the information I need for my server/client communication.
Another problem I have is: How do you avoid having a duplicate class for the server and client when sharing objects of the same type? One solution would be to only send primitives or standard java classes, then convert them at clientside…this will result in lots of coding work with boring conversion stuff…
Please consider these TWO questions In advance I ask of you to read the entire post before replying.