Jump to content

  • Log In with Google      Sign In   
  • Create Account

Lockstep and pathfinding


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 xiongyouyi   Members   -  Reputation: 150

Like
0Likes
Like

Posted 09 July 2012 - 02:48 AM

We are making a RTS game that use lockstep, can we use a middleware for pathfinding(NavMesh)? How to integrate? Thanks!

Sponsor:

#2 Hodgman   Moderators   -  Reputation: 31798

Like
0Likes
Like

Posted 09 July 2012 - 03:02 AM

Yes, you just need to make sure that the middleware is deterministic, i.e. if every client sends identical inputs to the middleware, then it will generate the same outputs for each client.

#3 hplus0603   Moderators   -  Reputation: 5693

Like
1Likes
Like

Posted 09 July 2012 - 05:09 PM

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.



enum Bool { True, False, FileNotFound };

#4 xiongyouyi   Members   -  Reputation: 150

Like
0Likes
Like

Posted 18 July 2012 - 11:04 PM

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.

#5 xiongyouyi   Members   -  Reputation: 150

Like
0Likes
Like

Posted 19 July 2012 - 03:02 AM

Any suggestions about unit tracing? Thanks a lot!




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS