Skip to content

Flocking

Simon (darkside) Jackson edited this page Aug 21, 2020 · 7 revisions

Flocking

Area Submitted Type
Games: Artificial Intelligence 8/29/2008 Code Sample

Description

This sample demonstrates how AIs can use simple rules to move together and create complex behaviors.

Sample Overview

When programming the AI for your game, you often want your actors to move and react together, without having to behave identically. For example, you might want to simulate a school of fish that all swim together without a centralized control, or a battalion of soldiers that can march together in formation around obstacles.

This sample demonstrates some of these behaviors. The sample has a flock of birds that fly to, and in the same direction as, other birds they see nearby. The sample also has a cat that you can turn on and who then chases the birds as they run away.

All content and source code downloaded from this page are bound to the Microsoft Permissive License (Ms-PL).

XNA_Flock_01_small.jpg XNA_Flock_02_small.jpg XNA_Flock_03_small.jpg

Download Size Description
FlockingSample_4_0 0.16MB Source code and assets for the Flocking Sample (XNA Game Studio 4.0).
FlockingSample_4_0.zip 0.16MB Source code and assets for the Flocking Sample (XNA Game Studio 4.0).
Clone this wiki locally