Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by abdosaher · Oct 31, 2012 at 10:21 AM · aipathfindingnpccharactersastar

How to use A* pathfinding for a large map?

So currently i got used to A* pathfinding and it has been good so far but how do i make the pathfinding on a bigger map with more AI characters(an army for example). The problem is if i make more graphs that will make the game laggy and same goes to expanding the graph, Also i came to know that multiple AI characters asking for a path at the same time will also make the game laggy. So what should i do to use A*(or another pathfinding system if there is one that is better) on a large map with big number of AI characters???

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image abdosaher · Oct 31, 2012 at 06:19 AM 0
Share

I would also appreciate if anyone can tell me the pathfinding approach used in Strategic games like total war?

2 Replies

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by adrenak · Oct 31, 2012 at 05:11 PM

When you are making locomotion programs for a group of entities, it is not practical to do the path analysis for every character, this way you always will end up with something really slow for a game, and will also get unrealistic results as the behavior will be like every entity (or soldier in your case perhaps) will end up looking as if it is acting alone, ignoring everyone else in the group it belongs to.

I don't think that A* is the way to go ahead with. Have a look here, these are really good works by Craig Reynolds and you can find group/combined behaviors. You can also have a look at Programming Game AI By Example by Matt Buckland, it has a chapter for path planning and briefly deals with group behavior such as cohesion, which I think is a good solution for your question.

I hope this helps! -Vatsal

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image abdosaher · Oct 31, 2012 at 07:06 PM 0
Share

I took a look at steering and apparently it works by setting waypoints for the game object not by actual pathfinding, That will make the crowd look unrealistic and the approach will not be practical for a large map i believe.. is that right?

avatar image adrenak · Oct 31, 2012 at 11:10 PM 0
Share

Yes. Its not a very practical way, and the crowd will not look realistic as there are no inter dependencies between their locomotion, which results in the members of the crowd trying to run into the other members and so on.

If you still want to make use of A* then use it for the crowd and not for every individual in the crowd. This way, you can move the crowd along a sequence of waypoints, or along the A* route and make the crowd move as a group.

For example, do an A* search and find the suitable path, then assign a group leader of the crowd that follows the path found by the A* and let the other members of the group follow the group leader. Or ins$$anonymous$$d of having a group leader, keep some cohesion between the crowd members to keep the crowd together and move the crowd as a whole along the A* path

avatar image abdosaher · Nov 01, 2012 at 01:15 AM 0
Share

Well this is the greatest piece of advice i stumbled upon, I cant believe you are a 17-year old. but even if i do that and let one guy be the leader still i need a solution for expanding the graph map without having any lag? But thanx alot though

avatar image
1

Answer by abdosaher · Nov 06, 2012 at 05:14 AM

OKay I found out how to do this, I used the WaypointMaster technique found at unify for when the NPCS are out of sight unless they are visible by the player then they switch to the A* method..

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

10 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

A* or AStar Pathfinding doesnt work for me? 0 Answers

How do I go about making a 2d platform enemy ai 1 Answer

Astar Pathfinding ai moves more nodes than it should 0 Answers

Colliders and Astar 0 Answers

Sidescroller AI/Pathfinding/Flags/Waypoints 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges