This video introduces you to the Behavior System series, outlining the process we'll be using to create layered behavior for objects in an XNA game.
To kick things off, we set up our Visual Studio XNA project, as well as getting a base texture in places and setting up the initial portions of our Actor class.
We now need to add in the methods to get random screen position and random direction, after which we should be ready to instantiate the actor class.
In this video we begin the setup of our behaviors. To begin, we set up the Behavior class, from which we will blend between our various types of behavior for our actors.
For our first inherited behavior class, we will create a behavior type that allows the player to influence actors using the gamepad.
We now create a new type of behavior that will cause an actor to "wander" in a specific direction, with random direction changes throughout its life.
Our next layered behavior is "seeking." Any actors that are using this behavior will simply follow a leader, as if they were a mindless drone.
Here we create a new behavior type of "avoid." This causes an actor to run away from a target, making it essentially the opposite of the "seek" behavior.
In the final video of the Behavior System series, we use our existing behaviors in some examples to keep actors away from a wall and to chase after an "enemy."