Calculating position from a time in the past

Topics: Developer Forum
Feb 10, 2012 at 3:40 AM

I'm doing a pretty simple strategy/arcade game with some physics,  but I've got a problem with how to sync positions.

Currently I'm just having clients pass an event to each other, for example, LaunchedRocket.At( x , y, time).

Obviously there is latency between players,  so I need to be able to figure out where the object is now, given the start time and position.

I don't see any way to calculate that in the engine,  you apparently can't step a single object forward a certain amount of time.

Anyone have a nice solution?

I'd prefer not to have a whole duplicate physics simulation setup just to calculate that every single event.

Feb 13, 2012 at 6:33 PM

I'd create a server that would run all of the physics and then have the clients trying to reproduce the servers results. I'm not very good with this but googling around for client-server 2d physics might be a good idea :) Maybe on the box2d forums too.