Sign in to follow this  
xiongyouyi

Lockstep and pathfinding

Recommended Posts

If the library is deterministic, then yes, you can use it for lockstep networking.

If it's not deterministic for whatever reason (floating-point rounding across Intel/AMD without the right control bits, use of rand() or other static state, etc) then you'll have to decide on one particular node making each particular path planning, and sending that path as "control data" to all the other nodes. That can still be lock-step. Instead of sending "user sent unit A to location B," you send "user set unit A to walk across the path P," which everyone can follow deterministically.


Share this post


Link to post
Share on other sites
Thanks! There are two main thread in our project, lockstep thread and mainthread, now pathfinding running in lockstep thread. If i move the pathfinding from lockstep thread to mainthread, sending path as lockstep input, i worry about the pathfinding in unit tracing, because the unit tracing need send path frequently, there will be large data.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this