Results 1 to 12 of 12

Thread: Pathfinding Advice (resolved)

Threaded View

  1. #1

    Thread Starter
    Member
    Join Date
    Nov 2002
    Location
    Australia
    Posts
    34

    Pathfinding Advice (resolved)

    I am trying to find the best solution to overcome a problem i have encountered. In the attached picture, you can see on the right side of the screen that all the AI's are starting to bunch up (the red things with bits of blue are supposed to be zombies. The textures for them haven't been done yet ). It's even worse in game since they kind of "queue" until they can move. What i would like to do is to have them use an alternate path if they cannot move. At the moment the AI will calculate the shortest path to the nearest player unit (there can be up to 4 player units) using the A-Star algorithm.

    My thoughts would be to have a variable for each AI that keeps track of how long it has remained motionless. After a period of time, i would have them find the 2nd shortest path (3rd, 4th, and so on) instead of the shortest and have them use that path to move towards the player.

    Can anyone suggest a better way?
    Or am i already on the right track?

    The problem doesn't always happen since it depends on how many enemy AI are present (there can be up to 23 and will respawn) and the location of the player units, but to me the game would play better if they occasionally used a different path anyway.
    Attached Images Attached Images  
    Last edited by Dekade; Feb 23rd, 2004 at 08:58 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width