Client-server networking, node issues


This problem involves two JVMs:

  1. Server: It runs a simplified version of game loop (from AbstractGame to PhysicsGame, everything involving the rendering, input, etc. has been removed).

  2. 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() {



    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!

First of all I'll clarify that I'm biased, and then I'll tell you how awful RMI is of a choice for any kind of real-time development. :wink:

I would recommend taking a look at a framework that is explicitly designed for game networking versus something that is even considered bloated for non-real-time communication.

Take a look at Darkstar or JGN and a lot of these issues will also be handled for you.

Ah, oh, hehe, RMI is… I meant…

I’m serious, look.

No? Ok. Good pointer you give me there, will make me think twice when I’ll need networking (in any app). Bohoo, I thought RMI was the golden hammer. Hehe.

Ah! I see there’s even a tutorial for flagrush with JGN?! Wohoo ^^

Thanks for your time DF.