Alice Workshop Problem Solving with Alice 2 & Friends Copyright 2011 Wanda Dann, Steve Cooper, Don Slater Traditional Problem Solving Strategy Read and understand a problem or task specification Design a solution (develop an algorithm) Implement (write code) Test Revise, as needed Copyright 2011 Wanda Dann, Steve Cooper, Don Slater Alice Problem Solving Strategy Problem Statement Understand the problem Design a solution Test Implement the design Copyright 2011 Wanda Dann, Steve Cooper, Don Slater Step 1: Understand the Problem Problem Statement Identify the objects (characters / props) Identify the actions Understand the problem Implement the design Design a solution Implement the design Copyright 2011 Wanda Dann, Steve Cooper, Don Slater Alice problem Design and implement an animation to create a film-short that tells this story (based on a Garfield® comic strip). Garfield and Odie are sitting at a table. The table has plates and other items, similar to a outdoor picnic table. Odie turns to look at the camera. A vibrating sound is heard and Garfield shakes. A second vibrating sound is heard and Odie shakes. This vibration & shake action repeats. Finally, Jon peeks in and asks Garfield and Odie to stop texting one another. Garfield and Odie look at one another and then continue texting! Copyright 2011 Wanda Dann, Steve Cooper, Don Slater Read & Understand Design and implement an animation based on the following: Garfield and Odie are sitting at a table and Odie is facing Garfield. Odie turns to look at the camera. A vibrating sound is heard and Garfield vibrates. A second vibrating sound is heard and Odie vibrates. Then, Garfield and Odie vibrate at the same time. Finally, Jon peeks in and asks Garfield and Odie to stop texting one another. Garfield and Odie look at one another and then continue texting! Red – objects Green - actions Copyright 2011 Wanda Dann, Steve Cooper, Don Slater Step 2: Design Problem Statement Understand the problem Set up the scene Test the code Design a solution Develop an algorithm (storyboard) Implement the design Copyright 2011 Wanda Dann, Steve Cooper, Don Slater Design tool To create a design, we borrow the idea of storyboards from professional animators at Disney, Pixar, etc. Copyright 2011 Wanda Dann, Steve Cooper, Don Slater Visual Frames Sketch and a description of the action. Each successive frame is for a major action in the story/game. Copyright 2011 Wanda Dann, Steve Cooper, Don Slater Resource In Day1/Resources folder Storyboard_template.pdf Copyright 2011 Wanda Dann, Steve Cooper, Don Slater Textual Storyboard Algorithm Do in order odie turns to look at the camera vibrations: garfield, then odie, then together jon asks them to quit texting garfield and odie continue Copyright 2011 Wanda Dann, Steve Cooper, Don Slater world.my first method When Play button is clicked, my first method runs (executes). Copyright 2011 Wanda Dann, Steve Cooper, Don Slater Create a comment Comments Are not executed when a program runs Explain the programmer’s intent Copyright 2011 Wanda Dann, Steve Cooper, Don Slater Enter a string A “string” is a sequence of symbols (alphabetic, numeric, special chars) Copyright 2011 Wanda Dann, Steve Cooper, Don Slater Algorithm Continue, one comment per each line of the algorithm (storyboard) Copyright 2011 Wanda Dann, Steve Cooper, Don Slater Setting up a scene We will set up the scene, step-by-step Scene Preview: Note: Jon is off-camera (to our right as we view the scene). Copyright 2011 Wanda Dann, Steve Cooper, Don Slater Select Template Copyright 2011 Wanda Dann, Steve Cooper, Don Slater Toggle to scene editor Click on Add Objects button Toggles from code editor to scene editor Copyright 2011 Wanda Dann, Steve Cooper, Don Slater Using the Gallery The Gallery contains 3D models for creating objects in a scene. Copyright 2011 Wanda Dann, Steve Cooper, Don Slater A 3D model is a class • Each class defines a type of object An object is a new instance of the class Copyright 2011 Wanda Dann, Steve Cooper, Don Slater Add Garfield From the Garfield gallery, add a instance of the Garfield class. Two options 1) Drag n’drop 2) Single-click on thumbnail and then the Add Instance button Copyright 2011 Wanda Dann, Steve Cooper, Don Slater Object tile in object tree Copyright 2011 Wanda Dann, Steve Cooper, Don Slater Object properties Object with bounding box Orientation Objects are positioned in 3-D space have a sense of orientation have six directions of motion Copyright 2011 Wanda Dann, Steve Cooper, Don Slater Mouse Controls Mouse controls change the way the mouse is used to reposition objects in the world. White arrow is the default mouse control Copyright 2011 Wanda Dann, Steve Cooper, Don Slater Undo The Undo button “backs up” one step Can be clicked more than once… to undo more than one step. Copyright 2011 Wanda Dann, Steve Cooper, Don Slater Put it back! Always remember to put the mouse control tile back into default icon (white arrow) before going to next action. Copyright 2011 Wanda Dann, Steve Cooper, Don Slater Your turn Add an Odie object Use mouse to turn garfield and odie so they are both in the center of the scene and facing you. (Does not have to be precise.) Copyright 2011 Wanda Dann, Steve Cooper, Don Slater Save the world Use File/Save As for the first save. Select a location where the file will be saved user account desktop USB drive Copyright 2011 Wanda Dann, Steve Cooper, Don Slater