I am making an open world game, similar to a city. I need an NPC AI, which is able to wander around the map properly similar to many games such as GTA5, and WatchDogs. I have seen a few posts around the devforum showing similar systems, but i’m not sure how they did it.
My game will consist of a large city, and I want the NPCs to walk around like pedestrians. I’m not sure how I would do this, as I am fairly new to roblox pathfinding and NPCs.
Using weighted navmeshes/nodemaps alongside an A* algorithm (or D* if your map is more versatile) is probably best, compared to PathfindingService because you cannot specify to follow a general path with it. Using weighted navmeshes (crossing a street “costs” more than crossing a crosswalk) is how you get pedestrians to “follow” certain guide paths.
There are MANY resources for this. Here’s my favorite: Amit’s A* Pages – Grid based, you should start with this one. Introduction to the A* Algorithm – Navmesh based, do this after the first one.