🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

right way of implementing deterministic lockstep for turn based games?

Started by
1 comment, last by hplus0603 3 years, 7 months ago

hi.

maybe lock step doesnt work in realtim games like battlefield but as i see lots of turn based that try to avoid server side authorization use this technique.

as the concept says:

  1. every client should run the simulation and all calculation on its own side.
  2. no client should be able to make a new action until all players are in the same states.
  3. security?

is it all the concepts? i assume for security each client should validate any new Move Request to check the player has done a valid move if we want to avoid server-side authorization.

for checking that all players are in same state:

i assume all players should run the movements and animations to get to goal state. i think we can make a hash from the state to check all the states are equal.

is it right?

Advertisement

You can totally queue commands for a future step even if that step hasn't arrived yet.

You hide it on the clients, but playing a “yes, sir!” animation, or some other similar graphics/effects trickery, so that the player giving the command thinks the command is acknowledged immediately, even though the gameplay effects of the command don't take effect until a few turns later. That way, you can keep turns running faster than the round-trip-time, as long as the queuing amount is long enough.

enum Bool { True, False, FileNotFound };

This topic is closed to new replies.

Advertisement