- Home /
Fast Script Ai For mobile: Navmesh or A*?
Hi all. I' m making a zombie waves game for mobile(Android).
I have created my Enemy Ai using navmesh, but when i have more enemies spawned, my fps average is 6-10.
A* Pathfinding script is more fast then script+Navmesh?
I m scipting on Javascript.
Performance would more than likely come from optimizing your code, if you are using Unity Pro deep profile your game with the profiler and see what is causing the biggest performance hit because it might not be the path-finding.
with the profiler I see that my zombie script is the cause of low performace. i use javascript + Navmesh.
Answer by TonyLi · Jul 03, 2013 at 12:01 AM
Try waypoints instead. If you maintain a table of waypoints, it's very fast, and in many ways easier to implement than your own A* pathfinding. Also, it makes it very easy for you to control pathing during runtime.
Here's a good intro/rationale for waypoints: http://aigamedev.com/open/reviews/alienswarm-node-graph/
And a tutorial: http://www.digitaltutors.com/11/training.php?pid=641
BTW, here's the whole tutorial series: http://forum.unity3d.com/threads/125774-Digital-Tutors-Releases-4-New-Tutorials-Enemy-AI-amp-Waypoints-Character-Scripting
It's for Unity mobile development.
And here's AngryAnt's implementation: http://angryant.com/path/
Your answer
Follow this Question
Related Questions
Can you bake nav mesh in prefab mode? 0 Answers
Navmesh path without agent 1 Answer
How to make AICharacterController able to walk on walls and ceilings? 0 Answers
NavMesh - Different NavMeshAgent radius for gaps vs platforms 0 Answers
AI on dynamic navmeshes and moving platforms? (Drawbridges, Elevators, Monorail trains, etc) 1 Answer