"dynamic" nodes and links ?

Community Forums/General Help/"dynamic" nodes and links ?

RemiD(Posted 2015) [#1]
Hello,

If you have read/experimented about "dynamic" nodes and links, can you please share your thoughts about this ?

My approach to pathfinding is slightly different than those who use a grid because i use premade nodes and precalculated links.

For now i have done some experiments with nodes positioned near passages, near incorners, near outcorners, around obstacles, and precalculated the links between some nodes.
However the problem is if i want to be able to create/destroy or turn/move some obstacles, then i have to add some nodes around created obstacles, remove some nodes around destroyed obstacles, and recalculate the links, and this is rather complex and slow to do this while ingame.
But the the pathcalculation is fast (because there are less nodes).

So another approach would be to use nodes positioned on a grid, like 1 node each 1x,1z unit, and precalculate the links between some nodes.
Then if some obstacles are created/destroyed or turned/moved during the game, i can calculate which nodes are too near and intersect with some obstacles and quickly deactivate these nodes and the associated links. No need to create new nodes, no need to recalculate the links. I think this should be faster.
However the pathcalculation will be slower (because there are more nodes)...

Maybe you have some interesting thoughts or tips about this ?

Thanks,


AdamStrange(Posted 2015) [#2]
Have a look at the basis of tiny keep AI - which is node based:
https://www.youtube.com/watch?v=tAxfnFRB1Dg

This is quite early on in the dev and he changed stuff as he went along, but it is good to actually see a node system in operation and give you some ideas :)


RemiD(Posted 2015) [#3]
@Adam>> Thanks, i will take a look. :)


RemiD(Posted 2015) [#4]
Ok i have found a way to update quickly nodes and links depending on walls obstacles positions/orientations.