Skip to main content
fixed broken link, some typos, reworded a few awkward sentences
Source Link
Pikalek
  • 13.4k
  • 5
  • 49
  • 54

I suggest you implement some Flocking Behaviorflocking behavior principles on the movement method. If you don't know about Flockingflocking algorithms, here are some useful links and tutorials:

http://harry.me/blog/2011/02/17/neat-algorithms-flocking/

http://www.lalena.com/AI/Flock/

The trick would be the following:

1- The movement and it'sits direction each frame will be controlled by a movement vector.

2- The A* pathfinder will return an array of Waypointswaypoints the entity needs to go thru so it will end up at the desired location without running into walls and whatnot.

3- This vector is the resulting sum of other vectors, such as Cohesion, Separation and Alignment made generated by the flocking bevavioralgorithm. The some common vectors are cohesion, separation and alignment along with a vector pointing to the current Waypointwaypoint (heading).

This is not a silver bullet, though. The original Flockingflocking theory doesn't account for walls, or obstacles and neither. Neither implementing pathfinding, and nor combining Flocking it with Pathfindingflocking is not as trivial as it might seem.

I suggest you implement some Flocking Behavior principles on the movement method. If you don't know about Flocking algorithms, here are some useful links and tutorials:

http://harry.me/blog/2011/02/17/neat-algorithms-flocking/

http://www.lalena.com/AI/Flock/

The trick would be the following:

1- The movement and it's direction each frame will be controlled by a movement vector.

2- The A* pathfinder will return an array of Waypoints the entity needs to go thru so it will end up at the desired location without running into walls and whatnot.

3- This vector is the resulting sum of other vectors, such as Cohesion, Separation and Alignment made by the flocking bevavior, and a vector pointing to the current Waypoint.

This is not a silver bullet, though. The original Flocking theory doesn't account for walls, obstacles and neither pathfinding, and combining Flocking with Pathfinding is not as trivial as it might seem.

I suggest you implement some flocking behavior principles on the movement method. If you don't know about flocking algorithms, here are some useful links and tutorials:

http://harry.me/blog/2011/02/17/neat-algorithms-flocking/

http://www.lalena.com/AI/Flock/

The trick would be the following:

1- The movement and its direction each frame will be controlled by a movement vector.

2- The A* pathfinder will return an array of waypoints the entity needs to go thru so it will end up at the desired location without running into walls and whatnot.

3- This vector is the resulting sum of other vectors generated by the flocking algorithm. The some common vectors are cohesion, separation and alignment along with a vector pointing to the current waypoint (heading).

This is not a silver bullet, though. The original flocking theory doesn't account for walls or obstacles. Neither implementing pathfinding nor combining it with flocking is as trivial as it might seem.

I suggest you implement some Flocking Behavior principles on the movement method. If you don't know about Flocking algorithms, here are some useful links and tutorials:

http://harry.me/2011/02/17/neat-algorithms---flocking/http://harry.me/blog/2011/02/17/neat-algorithms-flocking/

http://www.lalena.com/AI/Flock/

The trick would be the following:

1- The movement and it's direction each frame will be controlled by a movement vector.

2- The A* pathfinder will return an array of Waypoints the entity needs to go thru so it will end up at the desired location without running into walls and whatnot.

3- This vector is the resulting sum of other vectors, such as Cohesion, Separation and Alignment made by the flocking bevavior, and a vector pointing to the current Waypoint.

This is not a silver bullet, though. The original Flocking theory doesn't account for walls, obstacles and neither pathfinding, and combining Flocking with Pathfinding is not as trivial as it might seem.

I suggest you implement some Flocking Behavior principles on the movement method. If you don't know about Flocking algorithms, here are some useful links and tutorials:

http://harry.me/2011/02/17/neat-algorithms---flocking/

http://www.lalena.com/AI/Flock/

The trick would be the following:

1- The movement and it's direction each frame will be controlled by a movement vector.

2- The A* pathfinder will return an array of Waypoints the entity needs to go thru so it will end up at the desired location without running into walls and whatnot.

3- This vector is the resulting sum of other vectors, such as Cohesion, Separation and Alignment made by the flocking bevavior, and a vector pointing to the current Waypoint.

This is not a silver bullet, though. The original Flocking theory doesn't account for walls, obstacles and neither pathfinding, and combining Flocking with Pathfinding is not as trivial as it might seem.

I suggest you implement some Flocking Behavior principles on the movement method. If you don't know about Flocking algorithms, here are some useful links and tutorials:

http://harry.me/blog/2011/02/17/neat-algorithms-flocking/

http://www.lalena.com/AI/Flock/

The trick would be the following:

1- The movement and it's direction each frame will be controlled by a movement vector.

2- The A* pathfinder will return an array of Waypoints the entity needs to go thru so it will end up at the desired location without running into walls and whatnot.

3- This vector is the resulting sum of other vectors, such as Cohesion, Separation and Alignment made by the flocking bevavior, and a vector pointing to the current Waypoint.

This is not a silver bullet, though. The original Flocking theory doesn't account for walls, obstacles and neither pathfinding, and combining Flocking with Pathfinding is not as trivial as it might seem.

Source Link
UBSophung
  • 344
  • 1
  • 2

I suggest you implement some Flocking Behavior principles on the movement method. If you don't know about Flocking algorithms, here are some useful links and tutorials:

http://harry.me/2011/02/17/neat-algorithms---flocking/

http://www.lalena.com/AI/Flock/

The trick would be the following:

1- The movement and it's direction each frame will be controlled by a movement vector.

2- The A* pathfinder will return an array of Waypoints the entity needs to go thru so it will end up at the desired location without running into walls and whatnot.

3- This vector is the resulting sum of other vectors, such as Cohesion, Separation and Alignment made by the flocking bevavior, and a vector pointing to the current Waypoint.

This is not a silver bullet, though. The original Flocking theory doesn't account for walls, obstacles and neither pathfinding, and combining Flocking with Pathfinding is not as trivial as it might seem.