Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

Flocking in RTS games

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
830 views
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Mar 8, 2010

part of a video of my flocking algorithms, RTS game.
there are 4 behaviors: cohesion, alignment, separation and avoidance.
cohesion steers toward center of unit's group,
alignment steers towards uniform velocity,
separation steers away from colliding units,
and avoidance steers away from obstacles.

as a formation flocking, basic cohesion is applied to steer towards unit's position in formation, not towards the centre of a group, which is recalculated every step.

there is a leader of a group, which behavior can be improved by using pathfinding (A*) or some optimizing algorithms...

Category:

Gaming

Tags:

License:

Standard YouTube License

  • likes, 0 dislikes

Link to this comment:

Share to:
see all

All Comments (3)

Sign In or Sign Up now to post a comment!
  • @ManInAHighCastle Thanks for the comment - but its really is a nightmare to program a good group algorithm. Have decided to cheat and allow objects to pass selectively through others - it still aint easy but it is doable...

  • @StunnedByStupidity You could do a distance check from the rest of the group's average position. If this exceeds a certain amount, you repath to rejoin the group.

  • Great demo. I have been SLOWLY working on similar on and off for months. I'm curious to know if you know how you manage part of a flock getting separated from the main body of the flock, say a fork in a wall, and which leads away from the main group (this would mean backing up and re joining the group). I have a lovely fast HPAstar algorithm. A nice fast (dynamic) AStar algorithm. But am LOST how you keep a group together following a single path... Any book suggestions would be much appreciated.

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more