Hi monkeys :).
I’m facing the multiplayer physics conundrum… and it’s hard on my lil head.
I’m wondering how do I find, on the server, where a spatial (with a controller) ends up, depending on the delay?
- client tells server what it wants to do
- server calculates direction and velocity
- server needs to check where the mobile would end, depending on the physics environment
But how to do that last point using bullet? I mean, I don’t want to start raytracing and calculating all the movements myself… bullet is more suited for that than I’ll ever be.
If I receive a message to go forward (with no speed change for simplicity) that was issued a 10th of a second earlier, what should the server do with that? Is there a way to immediately know where the vehicle would end up?
Or do I need to “play” the movement on the server for the duration of the delay to determine where it would end and only then send the new position to the client? Or play it for the duration of the delay and send new locations every interval of time? Or a’m I missing a nifty method?
Sorry for such a basic question, but I want to avoid going all the way and end up seeing it was a stoupid way of doing it :D. A little pointer would be great ^^.
NB: single player physics was easy due to jme features.