XNAGameStudio.github.io

Chase & Evade

Area Submitted Type
Games: Artificial Intelligence 5/26/2010 Code Sample
     

Description

This sample shows how to implement several simple behaviors for AI, including chasing, evading, and wandering.

Sample Overview

This sample demonstrates chasing and evading behaviors by using three actors—a cat, a mouse, and a tank. The tank and the mouse are controlled by AI, and the cat is controlled by the player. The tank chases the cat, and the mouse runs from the cat. The tank and the mouse wander around the screen when the cat is not nearby. The “turn toward” functionality from the Aiming sample makes it very simple to create these behaviors: chase, evade, and wander.

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

Download Size Description  
ChaseAndEvadeSample_4_0 0.07MB Source code and assets for the Chase & Evade Sample (XNA Game Studio 4.0).  
ChaseAndEvadeSample_4_0.zip 0.07MB Source code and assets for the Chase & Evade Sample (XNA Game Studio 4.0).