i got a serious problem:
i got a server and one client, each one running a gameworld. the clients sends a command like “i accelerate now”. the server gets it, and tells the objects in his world what to do. then, he sends the updated objects to all connected clients - in this case, the command’s sender.
the first time, it works well. the second time, the client gets the SAME object. by same, i mean oldobject==newobject. same reference. the one the client reads from his inputstream is the one he already has, which means the worlds are out of sync…
wtf is going on there ?
even wrapping the object in another one (a list for example) doesn’t change anything.
i refuse to create thousands of new objects every second just because this stupid stream thinks he’s clever…
what can i do ?