Pathfinder Needed

I am willing to pay.

It must not require nodes, and it must allow me to update the path of the humanoid if it is already pathfinding somewhere.

Keep in mind it will be pathfinding up to 30-60ish enemies at a time, so it can’t be too performance costly. (I can lower the cap of enemies spawned at once)

I have tried many times but I run into errors such as them not being able to go through doorways, and not being able to make sharp turns.

If someone could make a pathfinder, that would be great.
I’m not asking for it to be perfect, but as long as it can be used in semi-complex maps I’ll be happy.

Doesn’t require nodes, works for hundreds of NPCs, and never gets stuck? That’s a pretty tall order.

1 Like

Yeah, now that I re-read it I realize that.

I mean, I don’t expect it to be perfect. Let’s say up to 30-50 humanoids.

I can’t get the Roblox Pathfinding to work right for me, so if one of you can, that would be perfect.

Make nodes yourself or make a script to generate them. Otherwise you’re asking the AI to search thousands of nodes in a square grid every time it searches.

Would that be the most efficient way to go about it? What if I made a note every 5-10 studs so it could use the nodes to generate a path.

I’m not sure how exactly I’ll go about multi-story stuff but I’ll figure it out.

Place one at the exit and entrance of each doorway. The way your nodes should work is that if you can draw a ray between the two nodes then it will be used as a possible path. Keep that in mind while placing.

worth looking at

With this you can basically place nodes by clicking anywhere, and click one single button to connect them all(using rays like ScriptOn’s idea)

Comes with tons of other things including a pathfinding module with tons of useful functions!

Performance cost?
Seems to take around 3 milliseconds(0.003 seconds) to find a path with this in a nodegraph of over 250 nodes.

Also, use my pathfinder/nodegraph tools or not, but I recommend doing what I do, if you have a lot of npc’s close together, put them in a “Group” and only pathfind / do logic for that group like it was a single NPC. This reduces overhead insanely

2 Likes

try the black market?

One way to optimize path-finding for large quantities of mobs is to group them by their proximity to one another, then only path-find once for the group. That is, you can calculate the path for one member of the group then have the other mobs follow that one.

Even if you only form groups of 2 that’ll cut your path-finding cost in half. If you don’t want the grouping to look too obvious you can start to split mobs off of the groups one at a time by calculating their own paths after things get moving. This spreads the cost of path-finding out over time.

1 Like

@ProfBeetle

Yes, as I already said :stuck_out_tongue:

Ah sorry, I didn’t read through every post… my bad :blush:

1 Like

Maybe I’m mistaken, but there isn’t a lot we can do to fill this request if we don’t know what you’re doing exactly. Are you having NPCs pathfind through Crossroads or are you having them walk around an area like Nacht der Untoten? With the former you’d barely need to have any nodes, and with the latter you could have each room be connected to another and just pathfind between doorways and have the humanoid walk towards the target once inside the room. My point is we can’t help much without more details. Your (likely) best bet is to make a system that works just for your case over a system that works for any given challenge, and we don’t know your exact case.

1 Like

The thing is, I haven’t made any maps, but I can’t get them to navigate around the lobby correctly (but obviously I don’t expect it to navigate the obby selction of course).

I also inserted a few free models just to see if I could navigate throughout them, but they would always get stuck on the corner of the doorways if they were entering it at a ~75-90 degree angle (sharp corners when going along a wall and through a door on the wall)

I will be checking out the plugin @Elmuowo posted.

I get the getting stuck on corners problem, experienced it myself a few times but was too dumb to fix at the time. I’d set it up so if you’re going from point A, to point B which is going at 90 degrees to point C, make the NPC get closer to the B node before going on to point C.

Is the map going to remain the same throughout the game or are you going to have random things pop up to block previously-open areas of the map?

I think I’ll go with static maps. If I do end up making random events I will just automatically clear all paths and allow the current enemies to generate a new one.

Not sure if the plugin Stealth linked will be able to handle multi-story buildings w/ stairs or not, but I was thinking of making like a skyscraper map.

To keep NPCs from getting stuck while using the built in pathfinding, I have big cancollide parts where I don’t want NPCs going, I set the NPC physics ownership to the server, and then delete all the blocks locally.

That way the server sees the blocks and pathfinds around them without the blocks stopping the players from moving around.

2 Likes

Why would it not? It works as well as any pathfinder you might find in a triple-A title.

Example of a found path in a three story map with several staircases, 0:30 and forward


Also pseudo-dynamic, you can recalculate the nodegraph with a single function call

You could always do raycast pathfinding.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.