Class Work
Topic 5-1: Biplane
Click here to download the biplane world.
Complete Chapter 5, exercise 2 on page 135 from the Learning to Program with Alice textbook. The problem is restated here for those who do not have the book.
The point of this exercise is to create method that handle given events and to associate those methods with the proper events.
Flight Simulator - Alternate Version. In the original version of the Biplane program the plane does not move forward until the user presses and then releases the up arrow. Likewise for the space key and the barrel roll. This means, that multiple key-press/release events are needed to keep the biplane moving. In this exercise you will experiment with a different kind of event to control the movement of the biplane. Create a second version of the biplane world. In this version of the world remove the event linking the up arrow to the flyForward method. Create a new event (in the Events Editor window in the upper right hand of the Alice interface) by selecting let arrow keys move <subject>, as shown below.

Then, link the biplane, as shown below. Run the flight program to see the effect.

Try adding the following features to the program:
In the initial setup, move the camera into position behind the biplane and change the vehicle for the camera from the world to the biplane.
Add instructions to the program. Show 3D text when the world starts. Display the instructions for several seconds and then have them disappear.
add methods to perform a forward loop and a backwards loop. Tie these methods to events in the Event editor window.
try another way of controlling the biplane. Have the plane always moving forwards and allow the arrow keys to control the direction of motion. Set the up arrow to make the biplane turn up, the down arrow key to down, the right arrow key to right, and the left arrow key to left. You will need four different events, one for each key. Have the plane turn the appropriate direction as long as the key is pressed. This can be achieved by adding an event when a key is typed as shown above. After the event has been added right click on the event and select change to and then select while a key is pressed. Set the during part of this to call the appropriate turning method.
