woodpecker Posted April 4, 2022 Share Posted April 4, 2022 (edited) I read at some time that pathfinder is a real CPU hog in the game. I have been wondering if pathfinder use 3d data to solve paths. If so why not make a terrain dummy layer with fixed size 2d footprints for all 3d elements to solve paths. It would run so much more smooth and easy on CPU right? If units were represented in 2d as a circle and other static things (no go zones) just represented by the shape of their footprint. Trees, bushes and such should also just have a circle footprint. Steep terrain would also just have a footprint of no go zones. Like this units would not so easy get stuck and CPU cost would be very low as far as i can understand at least. Edited April 4, 2022 by woodpecker 1 Link to comment Share on other sites More sharing options...
Nullus Posted April 4, 2022 Share Posted April 4, 2022 I think that what you've described is the way the pathfinder already works. The pathfinder is 2d already, and I'm fairly sure that the everything 3d is only in graphics, not in pathfinding or simulation. 1 Link to comment Share on other sites More sharing options...
woodpecker Posted April 4, 2022 Author Share Posted April 4, 2022 Okay. But then it is weird that units get stuck in between threes etc the way they do.... Link to comment Share on other sites More sharing options...
BreakfastBurrito_007 Posted April 4, 2022 Share Posted April 4, 2022 (edited) 27 minutes ago, Nullus said: I think that what you've described is the way the pathfinder already works. The pathfinder is 2d already, and I'm fairly sure that the everything 3d is only in graphics, not in pathfinding or simulation. That would make sense to me, as when units climb hills, they do not slow down in horizontal velocity components, which indicates that the vertical dimension does not affect the pathfinders. This results in a greater overall velocity when climbing the hill. This is not a problem, it looks weird but it is in almost every game. Edited April 4, 2022 by BreakfastBurrito_007 2 Link to comment Share on other sites More sharing options...
Stan` Posted April 5, 2022 Share Posted April 5, 2022 The pathfinder overhead was greatly reduced by using more CPU cores (on things that have them at least) Nowadays graphics and javascript simulation are quite big on performance. Wraitii made a patch to reduce some performance loss due to the AI (data was copied to it which is slow) 2 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now