7. Direction and Movement: Air Raid II, Space Rocks, and Balloon Pop


Using Math to Rotate and Move Objects

Air Raid II

Space Rocks

Balloon Pop

In Chapter 5, “Game Animation: Shooting and Bouncing Games,” the games involved simple horizontal and vertical movement. Moving along the horizontal or vertical axis is very easy to program. But arcade games demand more.

In many games, you need to allow the player to turn and move. For instance, a driving game has both steering and forward movement. A space game also requires this, and might even need to allow the player to fire weapons in the direction that the player’s ship is pointing.

Using ...

Get ActionScript 3.0 Game Programming University, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.