WIP dijkstra (14/09/25) - new naviguation implementation system based on nodes

I open this thread coz the navmesh system is :poop: , so i hope Range/UPBGE has a new navigation system that can be easily set up by Range users.

Below , this is a starting base . I will add new features later. At the end it should make many npcs behave smart . So far, it’s just finding the shortest path

How-to-use :

  • just use the keyboard direction arrows to move the player. The npc will try to intercept you ! :ghost:
  • add as much as u want of new checkpoints with name “check_” +1 letter
  • checkpoint’s property “checks” are used to define the possible destinations for that checkpoint … so update that property for new checkpoints but also for old checkpoints when they can reach the new ones
  • walls (having property “map”) are used to deny visibility which combined with distance computation helps to know if a “closest” checkpoint is a possible candidate or not

Made in Range 1.0
dijkstra_shortest_path.range (742.5 KB)

UPDATE 14/09/25 : added many npc’s with speed variation and put 26 checkpoints

https://imgur.com/a/fPFL6Ff

@musikai , hope this will inspire you and makes u want to make an UPBGE version of this and backing a little game/showcase/proof_of_concept :smiley:

2 Likes

cool!
works directly in UPBGE 0.2.5 when renamed to .blend.
For current Range 1.6 it works with
import Range as bge

thx, i hope people will study it and come with suggestions or findings. Next step will be to plug some access and update the graph (basically, adding a huge arbitrary value to an edge between 2 checkpoint ) whilst above paths are updated but the graph remains the same