[ODE] Bending wheel axes and trimesh collision culling

johgor-0 at student.ltu.se johgor-0 at student.ltu.se
Sat Oct 22 15:07:20 MST 2005

> Out of curiosity, have you started working on the networking yet? I'm
> just starting that myself now and would be interested in comparing
> notes.

Hi Jason, 
thanks for your reply. I have sort of a tech demo with working network code. 
I'm aiming for LAN or highspeed broadband users so I'm not concerned about 
optimizations and so forth. My cars are built with 4 sphere for wheels, and a 
rigid body for the chassis, joined together with jointHinge2.

My approach is basically this: The simulation is done on the clients, and the 
clients send packets to each other in a P2P-fashion. The packets contains the 
users key-input, velocity on the jointHinge2-joints, and for each wheel as 
well as the chassis - the position and orientation of the RB, the linear and 
angular velocity, torque, force, pretty much a snapshot of the body.

The key-inputs as well as the velocities and forces on the RB's are set each 
time a new packet arrives, but the position and orientation are only set each 
0.7s or so.

This simple approach works quite well. When other cars are at a distance, it 
looks very smooth, but when the remote cars are up close to the camera, it is 
noticable that the position is set every now and then, especially if the 
position delta is large. 

What I would like to try is to interpolate towards real position and 
orientation of the bodies each new packet, and sync position only if it 
differs greatly.

I also want other rigid bodies in the world to interact with the players, such 
as crates or whatever, and I was thinking of a sort of bump-last-protocoll for 
synchronizing these objects. The player which last collided with the crate is 
responsible for sending data to the others until it auto-disables, keeping the 
simulations somewhat in sync. Haven't tried this yet though. 

I'd be interested to hear about your approach!




More information about the ODE mailing list