Also it seems inside your head you are mixing deterministic lockstep technique and authority plan. You should choose one particular, not try to do both equally.
You'll find other methods than simply rewind and replay. Customer aspect prediction is any action executed with the consumer which masks latency, for example you could possibly Enjoy the grenade throwing animation just before obtaining ack again from the server — the grenade alone will come out lagged, but the animation hides it more than enough with the person.
The simulation is incredibly tuned for distinct masses. If you modify mass, you must transform gravity and each of the collision constraint forces, or vice versa. Not really the best way to get it done, but speedy & fast for me to code.
many thanks with the reply. I do understand why the client would rewind. I suppose my real queries is exactly what occurs for the server. You’ve counsel within the responses the client simulation could operate ahead in the server so that once a consumer enter information arrives in the server, it can be in the proper time.
I have got collisions Operating fantastic wherever the server has the ultimate say, nevertheless the consumer predicts them, using collision detection during the replay. My dilemma is the fact in the scenario (may well not in fact be a huge issue in real scenarios):
Another option is deterministic lockstep, In case you have a deterministic physics simulation plus a minimal player depend it’s actually super easy to detect cheating.
I are actually programming offline games for many years now (personnal tasks only), and I really need to make a number of them multi-player (and ready to re-start off Those people assignments from scratch).
1) Consumer sends inputs, timestamping them with now+latency. Server applies these in its simulation and sends updates again on the client. Shopper rewinds and replays when important, or snaps when required.
This is completely different to what you would probably expect to do for a contemporary physics simulation where objects connect with each other and you've got to update The complete scene at once. To do this, start with a pure customer/server strategy initial, then if latency is a problem for you consider distributing the physics using an authority plan in order that aspects of the physics operate over the device that desires zero latency about that portion, eg. the players character, the players vehicle, objects the participant bumps into and many others.
Also, see my GDC2011 speak about networked physics. The element in there about how GGPO does it, is essentially the exact same system that LBP uses.
This will cause the customer to snap back for around half a next, then to wherever the initial position ought to have been. So eventually the server predicts the right way, as well as shopper finally ends up in the correct state, but it suffers some unpleasant visual flicker.
I have a handful of inquiries wrt this informative article and many opinions therein. I understand you wrote it a very long time in the past, but I come to feel the speculation remains legitimate.
When you have one thing slower, eg. similar to a buggy with suspension outcomes and lots of bouncing/tumbling movement go with a
Of course. The server won't do any rewinding, check my source having said that it is typical for projectile strike detection with the server to monitor historic positions for each player this sort of that it could possibly Check out if projectiles hit, some time prior to now. Google for “Valve Latency Compensation” to read more details on this. cheers