Zebra0.com

aliceAlice Programming

Alice Programming

Learn Alice in FREE step-by-step lessons.

Alice ProgrammingAlice Programming

An Alice3 virtual world
In Alice3 you will create virtual 3D worlds. You will add characters, animate them, and interact with the user to create games and tell stories. You will create programs by dragging and dropping graphic tiles. By animating and manipulation the 3D characters in the virtual world, you will learn to use the same programming tools that are typically taught in a beginning programming course.

Module 1: Introduction to Alice 3 +/-

The goal of this lesson is to download and install the latest version of Alice and run it.
You will learn how to navigate in Alice and learn about
some of the 3D models that you will learn to animate later in the course.

printable lesson
  1. INDEX (start here)
  2. Installing Alice 3: Install Alice in Windows or Mac

  3. A Brief Tour of Alice A Brief Tour of Alice: Video Overview of the components in Alice

  4. A Gallery Tour A Gallery Tour: Video overview of the 3D models available

  5. Objects: Shows some of the main categories

  6. Substitutions for things you can't find Substitutions for things you can't find: You won't find everything you want.

  7. Crashing: Alice tends to crash, but there are steps to avoid frustration.

  8. Create a Final Project: The final project, animating a fairy tale, or other known story, teaches you to design, test, and debug a larger project.

  9. Create a Final Project: The final project, animating a fairy tale, or other known story, teaches you to design, test, and debug a larger project.

  10. Self Study Questions Self Study Questions: What have you learned?

  11. Discussion questions Discussion questions: What do you think?

  • Self Study Questions
  • Module 2: Your First program: Hello World +/-

    printable lesson
    1. INDEX (start here)
    2. Select a starting template: There are many templates: grass, sea floor, snow, room, mars, and more.

    3. Code Editor vs. Scene Editor: Add 3D models in setup scene, add code in code view.

    4. Naming conventions: Follow these conventions for the names you give objects, variables and methods.

    5. Change the code preference to Java Change the code preference to Java: Show your code in the same mode as the videos.

    6. About the first program: Important things to remember when you create the first program

    7. The first program: Hello World The first program: Hello World: This video demonstrates how to create your first program.

    8. Editing the say command Editing the say command: This video demonstrates how to create your first program.

    9. Adding comments Adding comments: This video demonstrates how to add comments.

    10. Why Hello World? Why Hello World?: Why you should write the Hello World program

    11. Sim People Sim People: Sim people let you customize the appearance of a person.

    12. Using doTogether Using doTogether: Animals all say hello at the same time.

    13. Complete Step 1 of the final project.

    14. Camel Case: Camel Case is the naming convention of starting a name with a lower case letter, then using an uppercase letter for each new word. Examples: userName, madHatter, badDude, etc. Names can not have a space, and camelCase is a way to separate words in a name to make it easier to read.

    15. Self Study Questions Self Study Questions: What have you learned?

    16. Discussion Discussion: What do you think?

  • Self Study Questions
  • Module 3: The Software-Lifecycle +/-

    printable lesson
    1. INDEX (start here)
    2. Pseudocode: Step by step instructions written in human language. For example in pseudocode we might write "the ball bounces", but the actual code would have the ball move up and down.

    3. A game: Rock, Paper, Scissors: Explanation and Pseudocode for the game

    4. Flowcharts: A flowchart is a drawing that shows the steps in an algorithm.

    5. Storyboards: A storyboard helps you design the entire movie: each scene shows the actors, positions, and scenery

    6. Drawing Flowcharts Drawing Flowcharts: Video shows how to draw flowchart using draw.io

    7. Flowchart for Rock, Paper, Scissors game: The top level flowchart for the rock paper scissors game is shown.

    8. Truth table for Rock, Paper, Scissors game Truth table for Rock, Paper, Scissors game: Video creates a truth table in Excel.

    9. Complete Step 2 of the final project.

    10. Self Study Questions Self Study Questions: What have you learned?

    11. Discussion questions Discussion questions: What do you think?

  • Self Study Questions
  • Module 4: Start, Save, Reopen and modify your program +/-

    The goal of this lesson is to download and install the latest version of Alice and run it.
    You will learn how to navigate in Alice and learn about
    some of the 3D models that you will learn to animate later in the course.

    printable lesson
    1. INDEX (start here)
    2. Open an existing project Open an existing project: Instead of selecting a template choose other tabs: starters, my projects, recent, file.

    3. Adding Characters to a Full Scene Adding Characters to a Full Scene: One of the problems with starting with a full scene is that you may not be able to find the characters you add.

    4. Look up, Say it slower Look up, Say it slower: Make the witch look up, say the words slower.

    5. Editing the room template Editing the room template: Change the walls, ceiling and floor in the room template.

    6. Editing the code Editing the code: Edit the code, change the object, add parameters, and delete or disable statements.

    7. Functions vs. Procedures Functions vs. Procedures: In addition to procedures, there are also functions.

    8. Self Study Questions Self Study Questions: What have you learned?

    9. Discussion questions Discussion questions: What do you think?

  • Self Study Questions
  • Module 5: Understanding the Alice Virtual World +/-

    The goal of this lesson is to understand how objects view the world
    and how to move them in the Alice virtual world.
    You will be able to move, turn and roll the objects that make up your scene.

    printable lesson
    1. INDEX (start here)
    2. Movement in Alice Movement in Alice: Video demonstrates the basic principles of object motion and rotation

    3. How Objects see the Virtual World How Objects see the Virtual World: Video demonstrates move, turn and roll

    4. Directions Directions: Each object has a sense of direction: forward, backward, left, right, up, backward, and down.

    5. Dolphin tricks: Moves, Turn and Roll Dolphin tricks: Moves, Turn and Roll: A dolphin moves up, down, left and right

    6. A Dancing Chicken using move, turn and roll A Dancing Chicken using move, turn and roll: How to add move, turn and roll procedures to the code

    7. Using Functions Using Functions: Shows the difference between procedures and functions.

    8. Eagle flies around the mesa Eagle flies around the mesa: Eagle flies places using place and spatial relations.

    9. Rabbit Falls in Pond using Functions Rabbit Falls in Pond using Functions: Uses the functions getDistanceTo and getHeight.

    10. Self Study Questions Self Study Questions: What have you learned?

    11. Discussion questions Discussion questions: What do you think?

  • Self Study Questions
  • Module 6: Setting up the Alice Virtual World +/-

    printable lesson
    1. INDEX (start here)
    2. Changing the position of camera and objects Changing the position of camera and objects: Using the various handles

    3. Moving vertically Moving vertically: Use the handles to turn, roll, and move any of the objects in your project.

    4. Hang Picture on Wall Hang Picture on Wall: Putting a canvas on the wall

    5. Camera views: Stacking Boxes Camera views: Stacking Boxes: Different views help to stack 3 boxes

    6. How to Change the ground How to Change the ground: Change the ground, opacity, add fog, light from above and below

    7. Using Vehicles: A penguin and Egg Using Vehicles: A penguin and Egg: Position the egg on penguins feet, then make the penguin the vehicle for the egg

    8. Using Vehicles: Monkey holding Banana Using Vehicles: Monkey holding Banana: The monkeys thumb is made the vehicle for the banana

    9. Using Markers Using Markers: Markers let you set up positions for objects to move to

    10. Using Camera Markers Using Camera Markers: Camera markers let you set up positions for the camera to move to

    11. Self Study Questions Self Study Questions: What have you learned?

    12. Discussion questions Discussion questions: What do you think?

  • Self Study Questions
  • Module 7: Posing objects in Alice 3 +/-

    printable lesson
    1. INDEX (start here)
    2. Posing in Scene Editor Posing in Scene Editor: Learn to pose subparts in scene editor using handle tools.

    3. Posing using One Shots Posing using One Shots: Learn to pose subparts in scene editor using One Shots

    4. Opening and shutting a car door Opening and shutting a car door: Open the car door in scene view using one shots

    5. Troll turns head Troll turns head: Use a variable for the amount to turn head, use it to turn to left and right.

    6. Moving the arms Moving the arms: A biped's two arms are mirror images of each other.

    7. Posing using code Posing using code: Code is used to pose a subpart.

    8. Moving the legs Moving the legs: Legs both descend down from the body
      but are mirror images of each other from left to right.

    9. Moving the legs Moving the legs: Legs both descend down from the body
      but are mirror images of each other from left to right.

    10. Raising the leg: Try raising the other leg.

    11. Raising the leg: Try raising the other leg.

    12. Hands on the head Hands on the head: Variables are used to make it easier to experiment

    13. Self Study Questions on poses Self Study Questions on poses: What have you learned?

    14. Discussion questions on poses Discussion questions on poses: What do you think?

  • Self Study Questions
  • Module 8: Scene Procedures in Alice 3 +/-

    1. INDEX (start here)
    2. Scene Procedure for Top-Down Design Scene Procedure for Top-Down Design: A Scene Procedure is code that is separate from myFirstMethod

    3. Procedures for top down design Procedures for top down design: Video shows how to use procedure for top down design.

    4. Both an Indoor and Outdoor Scene Both an Indoor and Outdoor Scene

    5. Move code to procedures Move code to procedures

    6. Scene Procedures Scene Procedures: Hello World using procedures.

    7. Scene Procedures2 Scene Procedures2: The Yeti family says hello and goodbye using procedures.

    8. Disabling Procedure Disabling Procedure

    9. Scene Parameters Scene Parameters: Adding parameters makes the procedure more versatile.

    10. Playing Sounds Playing Sounds: Video shows how to import and play any mp3 file.

    11. Self Study Questions Self Study Questions: What have you learned?

    12. Discussion questions Discussion questions: What do you think?

  • Self Study Questions
  • Module 9: Variables in Alice 3 +/-

    printable lesson
    1. INDEX (start here)
    2. Variables Variables: What is a variable?

    3. Variables for ease of modification: Use variables to make changes easier

    4. Variable Scope: Scope is where a variable is available

    5. Data Types: Values in Alice can be string, integer, double, Boolean or any of the gallery classes.

    6. Drill on type Drill on type: See if you can select the correct type.

    7. Name of variables: Variable names must follow rules, such as no spaces.

    8. Drill on names Drill on names: See if you can select the valid names.

    9. Variables for movement: Variables are useful for any movement

    10. Editing variables: Add to variable

    11. S Jointed Model as variable S Jointed Model as variable: The jokester can be any of the animals.

    12. Self Study Questions Self Study Questions: What have you learned?

    13. Discussion questions Discussion questions: What do you think?

  • Self Study Questions
  • Module 10: Input from the user in Alice 3 +/-

    printable lesson
    1. INDEX (start here)
    2. Ask the users name and say hello Ask the users name and say hello: Use the function getStringFromUser to ask the user his name, then say hello using the name entered.

    3. Ask the user how old they are Ask the user how old they are: Use the function getIntegerFromUser to ask the user's age.

    4. Ask the users their favorite food Ask the users their favorite food: Wolf asks "What's your favorite food?", then says that is his favorite too.

    5. Panda asks how much to turn Panda asks how much to turn: We ask the user for a double and the panda spins around that amount.

    6. Martian asks if he is on Mars Martian asks if he is on Mars: We ask the user for a Boolean value.

    7. Self Study Questions Self Study Questions: What have you learned?

    8. Discussion questions Discussion questions: What do you think?

  • Self Study Questions
  • Module 11: Arithmetic Operations +/-

    1. INDEX (start here)
    2. Cost of 3 Soccer Balls Cost of 3 Soccer Balls: How much does one soccer ball cost? Then 3 would cost total=cost * 3

    3. Counters Counters: Penguins count using counter=counter+1

    4. The Witch is Older The Witch is Older: What ever age you say you are, the witch says she's older.

    5. The fish share the gold coins The fish share the gold coins: Learn about division and remainders.

    6. Integer Division Drill Integer Division Drill: Practice integer division.

    7. Remainder Drill Remainder Drill: Practice finding remainders.

    8. Finding a Tip Finding a Tip: The Mad Hatter calculates 15% tip.

    9. Cost of 3 different items Cost of 3 different items: Finds the total of 3 different values: total=total+cost

    10. Monkey jumps for banana Monkey jumps for banana: Monkey jumps a bit higher each time by multiplying variable by 1.3

    11. How far is the cave? How far is the cave?: We use a function to find how far away something is.

    12. How tall is the snow-woman? How tall is the snow-woman?: We use a function to find height.

    13. Discussion questions Discussion questions: What do you think?

  • Self Study Questions
  • Module 12: Boolean Expressions: true or false +/-

    printable lesson
    1. INDEX (start here)
    2. Ask if it is nighttime Ask if it is nighttime: The function getBooleanFromUser gives a choice of true or false.

    3. Using Boolean Expressions in If Block Using Boolean Expressions in If Block: Ask if Thor is happy, he says ha-ha or boo-hoo

    4. Pass or Fail Pass or Fail: Compare a score to 65 and say "Pass" or "Fail"

    5. Child or Adult? Comparing values Child or Adult? Comparing values: Compare age to determine if child or adult

    6. Restaurant? Using AND: && Restaurant? Using AND: &&: Need restaurant with hamburgers and pizza

    7. Teenager? Using AND: && Teenager? Using AND: &&: You are a teenager if age >=13 AND age <= 19

    8. Panda says "Whee!" if turning fast: Panda says "Whee" if amountToTurn > 2.0

    9. Who is taller? Finding larger of 2 Who is taller? Finding larger of 2: Use the function getHeight to find the taller of two animals

    10. A Quiz Game A Quiz Game: This video shows how to create a quiz and keep track of number right.

    11. A True/False Question: Using if to tell the user the answer is right.

    12. A drill on Boolean values A drill on Boolean values: See if you can do these comparisons

    13. The user is offered coffee and tea The user is offered coffee and tea: See if you can add another choice

    14. The seagull asks how many penguins there are. The seagull asks how many penguins there are.: See if you can add to this project

    15. Self Study Questions Self Study Questions: What have you learned?

    16. Discussion questions Discussion questions: What do you think?

  • Self Study Questions
  • Module 13: Creating Animation in Alice3 +/-

    printable lesson
    1. INDEX (start here)
    2. Control Structures Control Structures: Control structures control the order in which statements are executed.

    3. Using a count loop to count to 3. Using a count loop to count to 3.: Use count control structure to count to 3.

    4. Using a count loop to count to 3. Using a count loop to count to 3.: Use count control structure to count to 3.

    5. Using a count loop to shake head no. Using a count loop to shake head no.: Use count control structure to shake head no 3 times

    6. Using a count loop to wave Using a count loop to wave: Use count control structure to wave 3 times

    7. Using a count loop to wave Using a count loop to wave: Use count control structure to wave 3 times

    8. Counting with a while loop Counting with a while loop: A toddler says 1, 2, 3 using a while loop

    9. Counting with a while loop Counting with a while loop: A toddler says 1, 2, 3 using a while loop

    10. Count down and blast off! Count down and blast off!: Counting down with a while loop: 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 blast off!

    11. Scope of variables Scope of variables: It's important where you declare variables.

    12. Scope of variables Scope of variables: It's important where you declare variables.

    13. Yeti circles around baby penguin Yeti circles around baby penguin: Uses an endless while loop to circle continuously.

    14. Fish swims back and forth Fish swims back and forth: It's important to start and end in the same position.

    15. Moose and skunk move between marked locations Moose and skunk move between marked locations: Markers let objects move to a marked position.

    16. Pixie moves between marked locations Pixie moves between marked locations: Pixie moves between several markers.

    17. Editing markers Editing markers: Edit object markers: add, delete, re-rename, and change the color

    18. A Walking algorithm A Walking algorithm: Get into position, take three steps, return to starting position.

    19. Self Study Questions Self Study Questions: What have you learned?

    20. Discussion questions Discussion questions: What do you think?

  • Self Study Questions
  • Module 14: Class Procedures in Alice3: Reusable Code +/-

    printable lesson
    1. INDEX (start here)
    2. Loki Waves Loki Waves: Video shows statements for making Loki wave.

    3. A Biped Waving Procedure A Biped Waving Procedure: Copy the code for Loki waving to create procedure for any biped to wave.

    4. Adding Parameters to a Procedure Adding Parameters to a Procedure: Parameters are added so that we can vary the amount to wave and times to wave.

    5. Witch casts spell Witch casts spell: Parameters let us cast the spell on anything to change it to anything else.

    6. Break the Spell Break the Spell: A Scene procedure is used to break the spell.

    7. Make the dog crazy: Several Parameters Make the dog crazy: Several Parameters: Several parameters are added to call the dog.

    8. Anyone can walk Anyone can walk: A procedure for a biped to walk can be used for any biped.

    9. Self Study Questions Self Study Questions: What have you learned?

    10. Discussion questions Discussion questions: What do you think?

  • Self Study Questions
  • Module 15: Calculations and Functions +/-

    printable lesson
    1. INDEX (start here)
    2. Counter Loops Counter Loops: Using a while loop to count using counter=counter+1

    3. 3 Guys take turns counting 3 Guys take turns counting: Using a while loop to count using counter=counter+1

    4. Calculate Distance to Move Bunny Calculate Distance to Move Bunny: Distance to move to be next to something

    5. Calculate Distance to Move Skater Calculate Distance to Move Skater: Distance to move to be next to something

    6. Writing functions Writing functions: Create a function to get distance to move next to something

    7. Loop to add numbers: A loop to add numbers uses a running total: total=total + number

    8. Loop to add numbers and find smallest and largest: The first value is the smallest and largest so far.

    9. Self Study Questions Self Study Questions: What have you learned?

    10. Discussion questions Discussion questions: What do you think?

  • Self Study Questions
  • Module 16: Random Numbers +/-

    printable lesson
    1. INDEX (start here)
    2. Displaying some random values Displaying some random values: Uses textModel to display a random double value between 0 and 1.

    3. Displaying values from 1 to 6 Displaying values from 1 to 6: A random integer from 1 to 6 inclusive to roll die

    4. Panda Turns a Random Amount Panda Turns a Random Amount: A random double

    5. A Counting Quiz A Counting Quiz: How many fish do you see? (Some of the fish are invisible.)

    6. Addition Quiz: Bears ask you to add numbers, then tells how many you got right.

    7. Guess the Aliens number: Loops until the user guesses the number: give hints "too high" and "too low"

    8. A Penguin Jumps Up and Down A Penguin Jumps Up and Down: Use a random value each time he jumps to make it look more realistic.

    9. A Fish swims back and forth A Fish swims back and forth: Random numbers for the distance to swim makes it more realistic.

    10. Self Study Questions Self Study Questions: What have you learned?

    11. Discussion questions Discussion questions: What do you think?

  • Self Study Questions
  • Module 17: Arrays +/-

    printable lesson
    1. INDEX (start here)
    2. Arrays: Ready, Set, Go! Arrays: Ready, Set, Go!: Tortoise says "Ready", "Set", "Go" using array

    3. An array of animals An array of animals: An array of SJointedModel contains, yeti, tortoise and stuffedTiger

    4. The animals talk: Parallel Arrays The animals talk: Parallel Arrays: One array contains animals, the other the things they say

    5. Who's the tallest? Who's the tallest?: People are in an array, a loop is used to find the tallest.

    6. Animals counting Animals counting: An array of animals take turns to count

    7. Birds spread wings and say something Birds spread wings and say something: An array of birds perform

    8. Fish swim to cave with procedure Fish swim to cave with procedure: Each fish swims to cave with procedure

    9. Segments of an elephant's trunk as an array: The segments of an elephant's trunk, tail and a few other things are an array.

    10. Self Study Questions Self Study Questions: What have you learned?

    11. Discussion questions Discussion questions: What do you think?

  • Self Study Questions
  • Module 18: Advanced Techniques: The finishing touches +/-

    printable lesson
    1. INDEX (start here)
    2. As Seen By: A different point of view As Seen By: A different point of view: The argument asSeenBy shows a movement through the eyes of another object.

    3. A UFO as the vehicle for the camera A UFO as the vehicle for the camera: Video show how to assign a vehicle to the camera.

    4. A UFO as the vehicle for the camera A UFO as the vehicle for the camera: Video show how to assign a vehicle to the camera.

    5. Playing Sounds Playing Sounds: Video shows how to import and play any mp3 file.

    6. Using billboards to display images Using billboards to display images: A UFO lands in Paris using a billboard with a picture of Paris.

    7. A Simple way to change scenes A Simple way to change scenes: Create scene procedures and change the ground and visibility of objects.

    8. A Simple way to change scenes A Simple way to change scenes: Create scene procedures and change the ground and visibility of objects.

    9. Cinderella scenes with camera markers Cinderella scenes with camera markers: The camera uses camera markers to switch from scene on the left and one on the right.
      Uses two different Cinderellas.

    10. Adding transitions to scene changes Adding transitions to scene changes: Transitions are created by fading a billboard in and out.

    11. Adding transitions to scene changes Adding transitions to scene changes: Transitions are created by fading a billboard in and out.

    12. Export and Import procedures Export and Import procedures: This video illustrates how to export and import procedures and functions.

    13. Export and Import procedures Export and Import procedures: This video illustrates how to export and import procedures and functions.

    14. Export and Import procedures Export and Import procedures: This video illustrates how to export and import procedures and functions.

    15. Adding properties to a class Adding properties to a class: Video shows how to add properties to a class.

    16. Self Study Questions on advanced techniques Self Study Questions on advanced techniques: What have you learned in the advanced lesson?

    17. Discussion questions on advanced techniques Discussion questions on advanced techniques: What do you think?

  • Self Study Questions
  • Module 19: Events: Responding to the Mouse and Keyboard +/-

    printable lesson
    1. INDEX (start here)
    2. A dog wags his tail continuously A dog wags his tail continuously: The addSceneActivationListener makes a dog wag his tail continuously while other actions take place.

    3. Playing a background sound Playing a background sound: To play background music use initializeEventListeners to play sound together with myFirstMethod.

    4. Click on the bear event Click on the bear event: The bear says something when the user clicks on him.

    5. Click on several different objects Click on several different objects: Each animal says something when clicked

    6. Drag and Drop Drag and Drop: Using default model manipulation in event listeners lets the user drag and drop objects at run time.

    7. Collisions Collisions: Making something happen when objects collide.

    8. The keypress event The keypress event: Learn how to listen for a key press (typing a letter) and respond

    9. Object Mover and Key press events Object Mover and Key press events: Add object mover for the shark so that the user can move it with the arrow keys.

    10. A Timer Event A Timer Event: Using the timer event, the penguin says "Help!" at random intervals.

    11. Self Study Questions Self Study Questions: What have you learned?

    12. Discussion questions Discussion questions: What do you think?

  • Self Study Questions
  • Projects

    Glossary