What You Will Learn In this lesson you will
Approximate Time This lesson should take you about 2 hours to complete. Lesson Files Media Files: primary_event.dir bullet.png Starting Files: 2d_game_start.dir key_helper_start.dir Completed Files: key_helper.dir 2d_game.dir This is the second lesson in the third project, an old-style 2D Space Shooter. In this lesson you will add the player's ship to the game and create the Lingo necessary to control it using the keyboard's cursor keys. A look at the completed game Knowing how to poll the keyboard is an important part of your programmer's tool chest, and luckily Director makes it fairly easy to do. While there are various ways you can use Lingo to read the keyboard, we'll use a common method employed by many Director game developers: polling the keyboard within the frame's behavior script. |