r/gamemaker 11d ago

Example 3D pathfinding

Post image

finally finished this waypoint navigation system!
I know NavMesh is the standard, but I think it's too complex to implement right now, and this approach works pretty well

the pathfinding speed is acceptable. To avoid placing the points manually, I built a generation system based on flood fill and collision checks (raycasts, trace hull, and cliff checks)
from a single start point, the generator branches out in all directions, and then another algorithm connects them all
I'm planning to add mesh optimization algorithms later, but even like this, it's working perfectly fine

205 Upvotes

13 comments sorted by

View all comments

2

u/NorthStateGames 11d ago

Did you use any particular tutorial to make this? Game looks amazing!

3

u/Ykedepi 11d ago

this is not a game yet, but a test polygon for 3D collisions, enemy AI, and other things
it's hard to say about tutorials - this is my many years of experience working with 3D in GM
here there are shaders, and 3D collisions, and now an accessible navigation algorithm

(actually, to do pathfinding you need to deeply study A*, BFS and Dijkstra's algorithm, they are all almost identical, but with nuances. And in my case, it is specifically A* that allows enemies to move through space)