CNA Samples

Chase and Evade

Ported from Microsoft's XNA 4.0 Chase and Evade sample.

Source for this sample on GitHub ↗

A cat, a mouse and a tank on a blue field, with the tank and mouse AI states shown at the top left. Play ▸

Opens in a new tab. Move the cat with the arrow keys or hold the left mouse button to guide it.

About this sample

Guide the cat toward the tank or the mouse. The tank turns to chase the cat and stops when it catches up; the mouse flees when the cat gets close. Both wander when the cat is far away. Their current states appear on screen.

Controls

ActionKeyboardMouseGamepad
Move the catArrow keysHold left button at the destinationLeft thumbstick or D-pad
ExitEscape—Back