Looks great!
Gota take a look at the pre-alpha later.
Captain_Deathbeard wrote:The pathfinding works entirely on the background thread and is kind of hierarchical, so one click and your character can find his way from one end of the map to the other, even if the map is 20km across, without a touch on the frame rate. It also takes into account slope levels, so heavily-equipped characters have to avoid steep slopes and take the long way around, while agile ones can climb up cliffs. It also handles dynamic placing of buildings because its all done on the fly.
I've been trying to figure out a good way to do path-finding on my own for a while, but to no success.
Do you just take the height-map data and determine if an area can be accessed (climbed) or not?
If so, for ONLY terrain, this is easy implement.
However, once you start adding buildings, I'm a little puzzled on how you do PF.
(Assuming buildings are NOT loaded as part of the map/terrain/height-map), do you calculate the height by using the bounding box of each building?
The reason I'm asking, is because I can never seem to do proper PF with entities on my terrain.
IE. On a flat terrain, want to move to other side of building along path... how do you go about doing this?
If the map was all grids, this would be easy with A*, but I have no idea how to manipulate the mesh / height-map files to even get to this point.
If I know how to convert the raw data into some kind of data structure, I can do the PF fairly easy... and say grids X, Y, Z cannot be accessed because an object is in the way.
Could someone (anyone) please give me some tips on how to do this conversion process?
Lastly, you said the PF is done in a background thread.
May I ask how you went about this task, and how your thread hierarchy (order) looks like?
I've been doing everything in 1 thread, which I know, is simple, but not good for performance.