Hello!
This problem involves two JVMs:
- Server: It runs a simplified version of game loop (from AbstractGame to PhysicsGame, everything involving the rendering, input, etc. has been removed).
- Client: It runs a regular physics game, and polls the server for changes in the world. The client doesn't compute gravity, AI, etc. It only assumes how things should be within the scope of its rendering area, and then compares with what the server has computed.
} The approach I've begun with uses RMI to provide the client with a reference to the server's nodes. It works pretty fine, however, if let's say for instance, the server applies a rotation to a cube:
public void simpleUpdate() {
cube.setLocalRotation();
}
The client only gets the last angle of the cube when its reference was fetched.
I wonder, when applying a transform (rotation, translation, scale, whatever) to a same node, attached to two different root nodes (one in each JVM), am I to expect the transformation on both JVM, or i should explore some other possibility? This question just to make sure I've not forgotten something like:
"rootNode.updateEverythingMagically()" in my client's simpleUpdate() method…
thanks for your time!