Grid or Recast?

Hey all -

I bought pro up this weekend and have been having a blast making fast progress on getting my current game linked up to the plugin.

For pathfinding purposes - my game is like Starcraft vs 1 Computer opponent… a good amount of buildings drop early in the game and then maybe a new building every 10-15 minutes. The game has a longer timespan as well - (20+ hours instead of 30 minutes) so 95% of the game will take place when relatively few buildings are being generated.

Also, my maps are VERY large - my grid graph is currently 240*220 with a node size of 30. (It’s worth noting I’d like to decrease node size, but performance really dips when dropping lower than 30, it seems)

So far I’ve been using the grid graph and have had some good results other than a pretty dramatic drop in framerate. It looks like there are some improvements coming to Recast Graph updating somewhat soon.

Any advice on whether to stay with grid graph altogether, move to Recast now, or wait for recast improvements to be made before sinking too much more time?

Great product- thanks Aron!

Recast Graph Sounds like your best bet~

How long is the seeker getpath time??
How many units are you moving??

Some tips to better pull off what your looking for:

A Recast Graph with funnel modifiers would help performance a lot! Make sure you fully Multi-thread too!

Make sure to ALWAYS test FPS on the build version, Unity’s built in player will give you funky results.

As for buildings:

Far as I know, Starcraft mostly uses Local avoidance(RVOControllers) and does not update the Graph for building placement~

Use RVOControllers on units and RVOobstacles on your buildings and you should be set!!

If you want the terrain to change:

Unless you need fully dynamic path blocking, Id say do the same thing that most RTS’s do and Cash a Graph for each version. This has basically no performance overhead but can be a little time consuming to do by hand if you have a lot of destructible terrain or things of that nature.

You could also set the navmesh points(the Triangles) to unwalkable if you don’t want to do the above~

Also if you need help setting up RVO stuff, let me know !!
For turning with a RVOController see: http://arongranberg.com/vanillaforums/discussion/770/direction-of-movement#latest
For most everything else see: http://arongranberg.com/astar/docs/local-avoidance.php

Wow - thank you so much!

I will definitely look more into the RVO Controllers - from what little I know, that makes a lot of sense. I definitely have no desire to ‘block off’ routes like in a tower defense game… anything in the way will be targeted and attacked by the AI.

There isn’t any destructible terrain either, so it sounds like Recast is definitely the best option. I’ll work on it this week and may take you up on the offer for more help. I’ll definitely start with your two links. Thank you again for your post and help!

No Problem Stevorino! Having to make some pretty robust Pathfinding for my own game I have gotten to know my way around A* path finding, and am happy to help! If you need anything you can get my Email via PM or just comment here!!

Note: If you want none-player units to block player units and vise versa (So you can block chokes and stuff with your units) I have a semi complete script add-on of for the RVO-Controller! Also Aron is working on updating the RVO Controllers to have a few nice features for RTS games (Including the one said above)

-Daniel