500 Agents Pathfinding + Dynamic Obstacle Avoidance

Enjoy!

500 Agents Pathfinding + Dynamic Obstacle Avoidance

This was made with SimplePath, which you can get here:

possible to offer a webplayer version for previewing? thanks

What’s the frame rate like? Really the important question is how much will this system impact a game’s performance in a real life scenario

Well, performance would be nice to know, but I reckon it’s hard to put into numbers as it is hugely dependent on all the other parts of a runtime scene.

I would be interested in this not so much for the Pathfinding (I have pre-calculated paths in my game) but for the Following and Obstacle avoidance features. Can they be utilized independently from the Pathfinding feature?

Lol this thread is filled with info

I asked him this in the main thread, they cannot (the avoidance is based on selecting an alternate path on the waypoint grid, around the obstacle).

The demonstration video shows movement predominately in the forward and backwards direction (z axis). I do not see hardly any left right movement. The agents goals are pretty much just right in front and behind them. Also, I do not see much dynamic obstacle avoidance with other agents since they pretty much just stay in their lanes to acquire their nearby goals.

Could we see a more robust video where agents have goals all the way across the grid in different directions? That would be a clearer demonstration of your system.

Thanks.

All good questions! I’ll try to answer them in order.

I think that’s a good idea, I’ll see what I can do and then post back here. But yea I could just export this scene and throw it in my dropbox.

I don’t have a way of recording framerate, but I could give you hard numbers if there is enough interest (I’m sure there is an FPS script out there somewhere, to save me a little bit of time :]). my guess is that the framerate is between 15 and 30 on my Alienware m-17x laptop (low end version). The bottleneck is in rendering and physics, which are external to SimplePath.

Having the agents traverse across the entire map would definitely be computationally more expensive, and I don’t want to give any false impressions with this video. The purpose of this video was to stress what SimplePath is really good at, which is handling a ton of agents in a dynamic environment, where paths are not super long. I think it would also be interested to have another stress test that demonstrates the performance of SimplePath under the conditions that you describe, which is traveling from point A to B across a huge map. I am certain that performance would be worse, but this type of problem is less important for games. SimplePath was built for more common use cases in games, where the action is typically local to the player, and you don’t have to solve the problem of traversing a gigantic map. If that is a problem you need to solve, then its often a better idea to use simple tricks, since the player cannot see action that is happening off screen. For example, most games have code to ensure that GameObjects off screen spend less time simulating. For a pathfinding system, this can mean replanning less frequently, or using some sort of waypoint system/abstraction hierarchy. SimplePath does support the ability to create any number of terrain representations (ex: I could have 10 separate grids). Building an abstraction hierarchy for SimplePath has certainly crossed my mind, and if there is enough interest, I’ll add one, but my current thought is that this feature is not useful enough to merit an implementation in SimplePath. Abstraction hierarchies + dynamic environments is certainly a hard problem to solve! I presented a paper on this at the AIIDE at Stanford last year

Right now I’m trying to gather up all the feature requests for a couple of weeks so I can see what everyone wants. Then I’ll spend some time implementing the most common requests, and release an updated version. Thank you everyone for the thoughtful responses!

-Alex

You can use the profiler window in unity to see a breakdown of all the various computation done in each frame.
It looks good though, I’m just weighing up the pros and cons of the various path finding packages.

How come unity has so many pathfinding scripts and yet I haven’t seen any ai script?

Behavioral AI middleware is not as mature as pathfinding AI middleware. I think its not used as much in games because the AI behave so differently in every game. Not many companies are buying behavioral AI middleware, but some are!

http://angryant.com/behave

Which I think is on the asset store