Blockland Forums > Modification Help

Navmesh / Pathfinding WIP

(1/18) > >>

Crook:
I'm working on navmesh again for Blockland. Thanks to the local torque wizards at BCC, I have made great strides since my last attempt and I can now actually link nodes together in a reasonable amount of time on meshes that have variable node sizes.



Will post updates in this thread. Or dump code if I abandon it. To be honest I'm really just trying to pressure the guys that have already made this and are keeping it to themselves into releasing it.

Crook:


There's a lot of optimization to be done but the fact that my computer isn't exploding right now is a huge step in the right direction probably

PhantOS:
because pathfinding only needs at least one node for each object's line of sight, its better to focus less on generating nodemaps and rather letting people build them manually. it's still cool though but it's always going to be very inefficient when compared to hand-placed node mapping.

ex: bottom right roof has at least 50 nodes on it and almost the same amount of paths that need to be traversed every iteration. it could be refactored into just one node in the middle of the roof and then you can let the ai follow based on direct line of sight, which will always be fastest. if you need extra ai capabilities like more complex movement and avoiding cliffs, you can just code that directly into the ai itself rather than let the pathfinding bear the brunt of the iterations. alternatively, you could use a second layer of nodes that the ai will use under certain conditions, ie in combat, put nodes behind boxes so that bots can take cover, or nodes for crouching under objects, etc. that would require using weights and heuristics, and on a generated node map like that, would basically slow everything down really quickly

PhantOS:
also looking at the photos gave me this wild idea for a mod that loads and refactors a map using the largest bricks available, to reduce brickcount. idk if this exists already but it should. call it 'superpack'

Crook:

--- Quote from: PhantOS on August 01, 2020, 10:34:38 PM ---because pathfinding only needs at least one node for each object's line of sight, its better to focus less on generating nodemaps and rather letting people build them manually. it's still cool though but it's always going to be very inefficient when compared to hand-placed node mapping.

--- End quote ---

This is still being worked on btw. I agree that it's probably the best solution. It's in a pretty good place right right now, I have successfully saved and loaded nodegraphs I made by hand with a tool



My complaint; it's extremely time consuming mapping out even a map as small as Afghan by hand. I suppose Afghan has a lot of nooks and crannies though, and the flow will be improved in the future. The new shapelines library will help with this. When complete, you should be able to generate a nodegraph and then edit it by hand to reduce the amount of garbage nodes.

On that note: I haven't done any work in combining nodes. I'm avoiding it because it's scary

Navigation

[0] Message Index

[#] Next page

Go to full version