Advanced Pathfinding

Recently, I was working on my game and because of Roblox pathfinding being quite terrible, I decided to make my own. It is based on the A* Algorithm and I would say that I did a great job.

[P.S] If you feel like the time in the video, taken to compute a path is quite much then that is because I was using an accuracy of 2 studs. I usually use 3 or more but I was using 2 so it required more computing.

It currently could be one of the few, best A* algorithms out there for roblox because I do not find any A* algorithm that has 3D implementation with proper optimzation. Most of them are simply 2D or if they are 3D then the path could be quite weird and usually isn’t performant. While this one is. It does not use any navigation mesh technology but rather is dynamic.

I hope you like this.

Did I did a good job on this?
  • Woah! That looks amazing! Great job on this!
  • It looks good, not much to say.
  • It has it’s issues that I have discussed in the replies.

0 voters

Should I make a tutorial on this?
  • Yes, you should show us how you made this!
  • No, you do not need to show us how you made this as it wouldn’t really be worth it.

0 voters

Thanks for reading my second ever topic here on the forum! Have a great day! ^-^

2 Likes

WOW! I love the 3D Pathfinding you made! And I also love that one ‘part’ u move and it generates a 3d path! Great Job!

1 Like

Why did you stop playtesting in the video before the NPC even got in the maze?

3 Likes

I needed to make the video short. The NPC took quite some time for navigation so I just stopped it. Also, I haven’t implemented AgentRadius yet so it gets stuck in the corners.

Is that the only issue you wanted to discuss about this? Please let me know if there are any other issues so I can improve this.

Thank you! I appreciate the kind gesture.

It would be really cool to see how you made it and so we can finally escape the default Roblox pathfinding system!

2 Likes

I would try that, but I would tell you that it does sometimes suck and can’t really do parkour. I still have to make many modifications.

1 Like

I think it’s cool. At least it works like uh most of the time (according to what you said) I guess people can refine it if they need to

1 Like

I see. Can you tell us how optimized the code is? For instance, how many NPCs can pathfind at the same time without considerable FPS drops, be it on server or client?

2 Likes

It usually depends on the map, as I have said it’s not the best but sometimes it can be better than Roblox’s pathfinding. I would say that it is as good as any other A* algorithm in performance as it uses the same exact algorithm but I just added some more rules to it. There would be considerable lag if you were to use this with like 10 or maybe more NPC’s as it has to compute the path from scratch while Roblox has a premade navigation mesh which it just iterates on making it much more smoother.

Common problem with AI (and not a criticism on yours it just happens in early stages) is un-human-like traversal

The main thing with that here is they go too close to the walls, cut corners too tight (can be fixed with splines) If you address these problems it will go a long way.

I had previously made a system that made it more human like using raycasts and a bit of maths to space out points unevenly but I deleted that a long time ago so I have to remake it.