| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!

View
 

Alice - Sequencing and Composite Objects

This version was saved 14 years, 2 months ago View current version     Page history
Saved by Steve Sweeney
on February 3, 2010 at 9:52:43 pm
 

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:

 

  1. Objects

    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:

    1. Properties

      These are the values that specify the object's characteristics, such as:

      1. colour
      2. opacity (the opposite of transparency)
      3. vehicle (if the object is riding around on another object)

         

    2. Methods

      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").

       

    3. Composite Objects (objects within objects)

      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.

       

  2. Sequencing

    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.

    1. Do together

      All statements included in the Do together block will be executed simultaneously (i.e., at the same time)

       

    2. Do in order

      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.

       

    3. 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).

       

  3. Storyboards or Flowcharts

    A storyboard is a term that originates from the film industry, where the scenes in a movie are sketched out with a brief description of the action.  It is also possible to have textual storyboards, which describe the scene without illustrations.

     

    A flowchart is another text-only description of the scene, except that it uses bubbles and arrows to show the flow of action through the scene.

     

    With Alice, as well as conventional programming languages, flowcharts and textual storyboards (commonly called pseudocode) are very valuable tools in the design process.

     

 

Comments (0)

You don't have permission to comment on this page.