Xbox LIVE Indie Games

code sample details

Chase & Evade

Submitted
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).

downloads

Framework

GS 4.0

Framework

GS 3.1

find education content
var gDomain='m.webtrends.com'; var gDcsId='dcschd84w10000w4lw9hcqmsz_8n3x'; var gTrackEvents=1; var gFpc='WT_FPC'; /*<\/scr"+"ipt>");} /*]]>*/
DCSIMG