Jump to content

PathRoute deterministic?


photo

Recommended Posts

Hi,

 

I realise there's currently a coversation going on in the Physics forum with regards to determinism of Unigine. I'd rather not get into the details of the discussions going on there but I just wanted a straight answer with respect to the current use case that we have for Unigine.

 

We are currently trying to get NavigationMesh/PathRoute working in our application. Our application requires replay capability and as such the path finding within our application needs to be deterministic. At this point in time we don't plan to use much of the physics within Unigine and ideally at this point we'd prefer not to run a master server that pushes object position updates around to individual Unigine instances.

 

So what I'm wondering is - is the Unigine PathRoute class when used with NavigationMesh objects deterministic in the paths that it creates in the case where there are NO Obstacle objects in the NavigationMesh? ie we calculate a 2D path for each object that needs to move up front and move those objects without further path calculations? The objects we're are looking to move are simple nodes and there are no physical bodies or the like attached.

 

- If we add an ObstacleCapsule as a child of the object that needs to move and call PathRoute::create2D every frame for each object that needs to move, are the calculated paths deterministic ie we could be guaranteed the objects will follow the same paths for replay purposes?

 

thanks

 

Craig

Link to comment

On one machine it's fully deterministic (no matter if capsule obstacles are used or not). No random values are used, so it's safe for replay. Floating-point arithmetic for path finding on different computers can lead to different results, I'm afraid.

(And here's also Captain Obvious' remark: do not calculate paths each frame, if possible - use the found path until the surroundings have changed.)

Link to comment
×
×
  • Create New...