| 
  • 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 Exercises - Creating Methods

Page history last edited by Steve Sweeney 14 years, 2 months ago

Save all completed exercises as "AliceExerciseA#.a2w", where # is the exercise number.

 

  1. Magic Cookies, Part 1

    Create a world that has a plate of four cookies.  The world should also have four empty plates.  When the world is played, the cookies should magically leviate, one by one, float to one of the empty plates, and then land on the empty plate.

     

  2. Magic Cookies, Part 2

    Modify the Magic Cookies world so that the cookies simultaneously float to and land on the empty plates.

     

  3. Drag Racing

    Create a world with a road (from the City collection) and two cars.  Resize the road to match the size of the cars.  The cars should start lined up side by side at one end of the road.  When the world is played, the cars should simultaneously move to the other end of the road and stop.  The cars should move at different speeds, so there is a winner and a loser.  Position the camera so you can see the cars as they approach the end of the drag strip.

    1. Play with the camera as an object, and have it do some movement to follow the action of the race.
    2. Have the speeds change at multiple points in the race (e.g., simulating the changing of gears).
    3. Add some sort of visual starting mechanism (e.g., lights, a starter with a pistol, etc.).
    4. Add some sort of visual ending animation.

       

  4. Create a world where a bird flies across the sky.  Add a method called flap to the bird that causes both wings to move up and down in unison for one full stroke while moving the bird forward a set distance.
    1. Make the flapping motion more realistic by having the bird's body rise slightly on the down flap, and drop slightly on the up flap.

       

  5. Create a world that shows and astronaut bounding across the lunar landscape, then planting a flag.  Create a new method called bound to show the exaggerated steps taken in the light gravity of the moon.  Create a new method called plantFlag that has the astronaut put the flag in the lunar surface.
    1. Since steps on the moon can be so large, you might want to create a boundLeft and boundRight to show the exaggerated hopping from each foot.
    2. Play with camera movement to give additional action and interest to the scene.

       

  6. Create a world that shows a mummy stalking slowly, with arms outstretched, toward the pharaoh.  When the mummy gets close, the pharaoh should gesture mystically, causing the mummy to fall backwards.  Add methods called step and fall to the mummy, and a gesture method to the pharaoh.
    1. Play with camera movement to give additional action and interest to the scene.

       

  7. Create a world where Mana (People)  has a magnet (Objects) held out in one of her hands.  Add five metallic objects of your choice to the world.  As Mana points the magnet at each object, one by one, have the object move to the magnet.  Have the last object be very large (e.g., a car, plane, or boat), so when Mana points at it, she is pulled toward the object instead, while saying something appropriate.

     

  8. Create a world that shows a tennis player taking a few practice swings.  Use an appropriate person from the People gallery, and the TennisRacket class in the Sports gallery.  You will want to set the vehicle property of the tennis racket to be the player's hand.  Create forehand and backhand methods for the player with appropriate movements.

     

Comments (0)

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