After creating a world using a background and various objects, it is possible to use Alice to animate the objects and create a scene. In order to have a scene animate properly, it is necessary to make use of the following concepts:
The object is the most fundamental concept in Alice. Everything in your world is made up of objects. Each object in Alice comes from the local gallery or the web gallery. The galleries contain the blueprints for each object, which in programming terminology are called classes. For each object that you add to the world, you can access or control the following aspects:
These are the values that specify the object's characteristics, such as:
Objects are able to perform actions, and the methods are the programming that specifies how those actions occur. Each object in Alice comes with a number of "primitive" methods, and many objects will have identical methods (e.g., "move" or "say" or "turn to face").
Many classes define their objects as a combination of smaller objects. A person, for example, might have separate objects for the head, arms, legs, and torso. Each sub-object may also have methods associated with it, allowing for detailed control of some objects. Be aware, however, that more objects to control can also increase the chance of making a mistake or getting unexpected results.
By default, any methods added to a world will be executed in order (i.e., from top to bottom, one at a time). This sequencing is fine for simple scenes, but may not be adequate for more involved scenes. Alice provides two (2) control statements to force blocks of code to use a particular sequencing. These control statements are found at the bottom of the Alice window.
All statements included in the Do together block will be executed simultaneously (i.e., at the same time)
All statements included in the Do in order block will occur one at a time, from top to bottom. At first, this may seem unnecessary, since this is the default behaviour for Alice. It becomes useful, however, when constructing nested statements.
The Do together and Do in order blocks will normally contain two or more methods from the objects in a scene. It is also possible to put either of these control statements into the block of another control statement, which produces a nested statement (i.e., the statements are nested within each other).
Exercises
All new worlds are located in X:\Docs\Handout\Sweeney\Alice Worlds.
Save a copy of each world in your own folder, H:\00 ICS xx\Alice\Alice Worlds
Save at least one example from each exercise
Modify the SurferWave world so that:
Programming Tasks