CTP User Control

From Scalable Game Design wiki
Jump to navigation Jump to search

Description

This pattern allows the user of the game/simulation to control an agent using the keyboard. So the interaction is between the USER and an AGENT

Keywords

You may need to use this pattern if you are using these words to describe the behavior: Press a Key, Move Using the Arrow Keys, Press the Space Bar

Real-World Examples

"The hero moves around using the up, down, left, and right arrow keys" "The hero jumps when the space bar is pressed"

AgentSheets Code

The example below is from the game Frogger, where the frog moves in a certain direction based on which arrow key is pressed.

CursorControlAS.png

AgentCubes Code

Check Your Understanding