APS - Setting the Scene, Camera, and Event Listener (Lesson)

Setting the Scene, Camera, Event Listener and More

There are many concepts in Alice that we can learn to make programming an enjoyable, creative experience. In this section we will learn how to setup our scene, use the camera to create better effects, find our way back if we get lost, as well some great code tips and tricks. Additionally we will learn how to control the program from keyboard input. Now you will be able to branch out and begin letting creativity blossom.  

Vocabulary to Understand in Alice

Alice word or phrase

Explanation

add detail

found within a method(procedure);   allows fine tuning of the behavior of the object

camera

how the scene is being recorded;

just like the making a movie, the camera may be adjusted for the best angle, closeness, etc.

camera markers

places in the scene where the camera is used with a new setting

count

allows for repetition of code in a loop until a number comparison causes the loop to stop;   found at the bottom of the code editor screen; a variable holding data for evaluation

create new method

allows a new method (set of procedures and/or functions) to be put together to create an   algorithm that could be reused; button to the left of scene at the top in the code editor

custom ...

allows for programmer input for control

edit code

found in the bottom of the scene window;   takes the user to the code editor window

eventListener

a special method that listens for keyboard input;   found in the initializeEventListener tab on the top of the code screen

handle style

default, rotation, translation, resize found at the top right of the scene setup

handle style default

the standard yellow ring around the object used for turning the object

handle style rotation

more rings allowing the object to rotate in three dimensions x, y, and z around its orientation point (left/right, forward/back, up/down)

handle style translation

three arrows to move the object right, left, up or down in the scene

handle style resize

allows objects to be made larger or smaller

keyPressed

an eventListener action which activates the keyboard

move to

have one object move to join another object at the same location

opacity

allows objects to become translucent, invisible or visible, depending on the setting, zero makes the object invisible;

found to the right of the setup scene in the object's properties

procedure

an action on an object, a behavior of the object, a method of behavior that is available for the object

scene

the background

sceneActivated

when run is clicked, start the scene with the events to take place; must always have myFirstMethod as the first method, this is the main method; other methods may be added

setVehicle

creates one object to be the transportation for another, allowing the vehicle to take the other object with it when the transportation object moves

this

the current object that is being used

undo

takes the scene back a step for each click;   found above the handle style

Experiment and create!  Debug, try out ideas and test for problems as you go along. If you don't the project gets too big and problems are hard to find.