1 / 7

CPSC 203 Tutorial

CPSC 203 Tutorial. Xin Nov 15, 2010. Introduction to Alice. Alice A very visible programming language Programming by dragging objects Interface World window The virtual world you are creating Object tree Objects organized in a tree structure Details area

lacy
Download Presentation

CPSC 203 Tutorial

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CPSC 203 Tutorial Xin Nov 15, 2010

  2. Introduction to Alice • Alice • A very visible programming language • Programming by dragging objects • Interface • World window • The virtual world you are creating • Object tree • Objects organized in a tree structure • Details area • Details of the world or an object in the world • Editor area • What objects do / Action script • Events area • When objects act

  3. Exercise • Run the Quick Tutorial

  4. Detail Area • Properties • Methods • The actions • Functions • Query properties of an object • Can be used as arguments for methods • Move the skater forward by her height

  5. Exercise • 1. Open the file lab1.a2w. • 2. Press the “Play” button to see what the world does. • 3. Modify the 2nd instruction so that the shark rolls right by 2 revolutions. • 4. Modify the 3rd instruction so that the shark says “I am hungry”. • 5. Modify the 4th instruction so that the shark moves forward by its distance to the blueminnow3’s tail – 0.5 • 6. Using functions, modify the 1st instruction so that the bigfish moves forward by its distance in front of the shark’s jaw. • 7. Using properties, make the blueminnow turn black then disappear at the end of the instruction list. • 8. Using methods, make the bigfish2 think “I should get out of here”, after the blueminnow disappears.

  6. Exercise • 1. Create a new world using the green grass template. • 2. Change the color of the grass to blue, so that it now looks like an ocean. • 3. Add an island object (from Environments) and a goldfish (from Ocean). Make sure they are both visible. • 4. Get the fish to roll left by 2 revolutions. • 5. Resize the island by a scale of 1.5. • 6. Using methods let the fish say “Yikes!” • 7. Make the fish move forward by its distance in front of the island * 1.5. • 8. Change the color of the grass to dark gray.

  7. Exercise • Create a world using a snow template. Add two snowwomen and one snowman to the scene. • A snowman is trying to meet a snowwoman who is talking to another snowwoman. He turns to face the snowwoman and says “Hello”. She turns to look at him then looks back at her friend, and continues to talk. The snowman’s face turns red, and he hangs his head down.

More Related