Skater World: Part Two By Deborah Nelson Duke University Under the direction of Professor Susan Rodger June 2009 1.

Slides:



Advertisements
Similar presentations
Visual Lists By Chris Brown under Prof. Susan Rodger Duke University July 2012.
Advertisements

Space Man Sam: Grammar Mistakes By Aleis Murphy Duke University, Under the direction of Professor Susan Rodger July 2010.
Princess & Dragon – Version 2 By Michael Hoyle under the direction of Professor Susan Rodger Duke University July 2012 Part 2: Using Methods.
Princess & Dragon – Version 2 By Michael Hoyle under the direction of Professor Susan Rodger Duke University July 2012 Part 3: Billboards, Events, Sounds,
Getting Started With Alice By Ruthie Tucker under the direction of Prof. Susan Rodger Duke University, July
Skater World: Part One By Deborah Nelson Duke University Under the direction of Professor Susan Rodger May 29,
Coloring Randomly: Random Selection in Alice By Jenna Hayes under the direction of Professor Susan Rodger Duke University July 2008.
Princess & Dragon Part 2: Teaching a Dragon to Fly—Methods & Properties By Elizabeth Liang under the direction of Professor Susan Rodger Duke University.
Lets Play Catch! Keeping Score in Alice By Francine Wolfe Duke University Professor Susan Rodger May 2010.
Scene changes By Deborah Nelson Duke University Under the direction of Professor Susan Rodger July 2008.
Skater World: Part Four By Deborah Nelson Duke University Under the direction of Professor Susan Rodger June 2009.
Lights Camera Action! Part 3: BDE Events By Deborah Nelson under the direction of Professor Susan Rodger Duke University July 2008.
Calvin and Hobbes Teach Properties and Functions Created by Daniel MacDonald under the direction of Professor Susan Rodger Duke University June 2013.
Methods Tutorial: Part One By Deborah Nelson Duke University Under the direction of Professor Susan Rodger June 9, 2008.
METHODS!.  A method is a sequence of instructions or behaviors that will be carried out when requested.  You can use them to create new methods so that.
Creating Functions Deborah Nelson Duke University Professor Susan Rodger July 22, 2008.
Alice Learning to program: Part Two by Ruthie Tucker and Jenna Hayes Under the direction of Professor Susan Rodger Duke University, July 2008.
Princess & Dragon Part 4: Breathing Fire—Adding Effects to Alice By Elizabeth Liang under the direction of Professor Susan Rodger Duke University June.
Lights Camera Action! Part 2: Controlling Light in Alice By Elizabeth Liang under the direction of Professor Susan Rodger Duke University June 2009.
Line up By Melissa Dalis Professor Susan Rodger Duke University June 2011.
Getting Started With Alice By Ruthie Tucker under the direction of Prof. Susan Rodger Duke University, July
Making a Boat Racing Game in Alice By Jenna Hayes Under the direction of Professor Susan Rodger Duke University, July 2010.
Alice Learning to program: Part Three Camera Control, Invisibility, and 3-D Text By Ruthie Tucker and Jenna Hayes, Under the direction of Professor Rodger.
Changing Camera Views! Part 2: Simple Scene Change & Lighting Fixes By Bella Onwumbiko under the direction of Professor Susan Rodger Duke University July.
Poses Tutorial Alex Boldt Under the direction of Professor Susan Rodger Duke University July 2015.
Changing Color, Using Text Objects, and Random Selection in Alice By Jenna Hayes Under the direction of Professor Susan Rodger Duke University, July 2008.
Teaching a character to walk in more than one world: Parameters and Inheritance. By Lana Dyck under the direction of Professor Susan Rodger Duke University.
Methods Tutorial: Part Two By Deborah Nelson Duke University Professor Susan Rodger June 16, 2008.
Now that the kangaroo and the turtle have raced, let's make a method for the kangaroo to hop back to the turtle and challenge him to a race again. Click.
By Deborah Nelson Duke University Professor Susan Rodger July 13, 2008.
Scene changes By Deborah Nelson Duke University Under the direction of Professor Susan Rodger June
Princess & Dragon Part 1: Objects in an Alice World By Elizabeth Liang under the direction of Professor Susan Rodger Duke University May 2010.
Lists Tutorial By Deborah Nelson Duke University Professor Susan Rodger July 13, 2008.
An Introduction to Alice (Short Version) – Extras! Yossra Hamid Under the Supervision of Professor Susan Rodger Duke University, June 2014 This is a continuation.
Piñata Game: Keeping Score in Alice By Maggie Bashford Professor Susan Rodger Duke University July
Skater World: Part Two By Deborah Nelson Duke University Under the direction of Professor Susan Rodger June 1,
Alice Learning to program: Part Two Writing Your Own Methods by Ruthie Tucker and Jenna Hayes Under the direction of Professor Susan Rodger Duke University,
Bunny Eat Broccoli Repetition – Simple loops and Conditional loops Susan Rodger Duke University July 2011.
Making Billboards By Deborah Nelson Duke University, Under the direction of Professor Susan Rodger, July 14, 2008.
Balancing the scales: Inequalities By Melissa Dalis Professor Susan Rodger Duke University June 2011.
Creating a 3D Interactive Story Prof. Susan Rodger Duke University July 19, 2007.
Skater World: Part Three By Deborah Nelson Duke University Under the direction of Professor Susan Rodger June 2009.
Skater World: Part Four By Deborah Nelson Duke University Under the direction of Professor Susan Rodger June 1, 2009.
An Introduction to Alice By Jenna Hayes under the direction of Professor Susan Rodger Duke University, June 2009 Updated June 2014 by Ellen Yuan.
BDE tutorial By Deborah Nelson Duke University Under the direction of Professor Susan Rodger July 13, 2008.
Illuminating Computer Science CCIT 4-6Sep
Using Placeholders to Simplify your Methods: Learning Methods, Part 2 By Deborah Nelson Duke University Professor Susan Rodger June 16, 2008.
Headshots in Alice Duke University Professor Susan H. Rodger Gaetjens Lezin July 2008.
Lesson 8C Animation and Events. Step 3: Animation Drag it into the method and have him say “let her go!” Click on the knight in the object tree and scroll.
Princess & Dragon Part 3: A Knight Comes Riding In—Cameras & Events By Elizabeth Liang under the direction of Professor Susan Rodger Duke University June.
Skater World: Part Four
Professor Susan Rodger
Teaching Characters to Walk: Learning Methods, Part 1
Professor Susan Rodger
Bunny Eat Broccoli Repetition – Simple loops and Conditional loops
Changing Color, Using Text Objects, and Random Selection in Alice
Skater World: Part Three
Methods Tutorial: Part Two
Making Objects Move in Unison: Using Lists
Princess & Dragon Part 2: Teaching a Dragon to Fly—Methods & Properties By Elizabeth Liang under the direction of Professor Susan Rodger Duke University.
An Introduction to Alice
Princess & Dragon Part 3: A Knight Comes Riding In—Cameras & Events
Getting Started With Alice
Learning to Program: Part 3 Camera Control, Invisibility and 3-D Text
Headshots in Alice Duke University Professor Susan H. Rodger
Professor Susan Rodger
Using Placeholders to Simplify your Methods: Learning Methods, Part 2
Making Objects Move in Unison: Using Lists
Presentation transcript:

Skater World: Part Two By Deborah Nelson Duke University Under the direction of Professor Susan Rodger June

Overview The story continues: After the conversation, we want skaterGirl to get on the skateboard, make the jump, and then skate around one of the cones What we will do: 3. Properties -Changing properties during set up -Changing properties during animations 4. Create new methods – Animating objects – Using As Seen By – Animating parts of objects 5. Using As Seen By - To move around an object 2

Methods A method is a sequence of instructions that will be carried out when requested. Built in methods are used to create new methods so that the characters can learn to do more. The two types of methods are class-level and world-level. A class-level (or object-level) method defines the behavior for a single object. A world-level method has objects that interact with each other. 3

To Create your method Since our methods involve several objects, we will create world-level methods. Click on world in the object tree. Click on the methods tab in the details areas. Click create new method. Name it “makeJump”. Click OK. A new tab appears in the method editor 4

The Events Pane – This is where you control when certain methods are called and the user interactions within your animation. Introducing Another Tool 5

When the world starts... As we write this new method, we don’t want to watch the entire conversation we wrote from part one every time we play the world. In the Events pane, click on the arrow and select makeJump from the drop down menu. 6

Writing makeJump method In our story, we want the girl to go to the skateboard Click on the makeJump tab in the method editor. On top of the Do Nothing drag in skaterGirl move to, select skateboard, the entire skateboard Play your world.  See the next slide for screenshot of what went wrong 7

The girls moves into the skateboard because the move to method uses the center of each object. We would have to manually measure how far the skaterGirl needs to move to the skateboard 8

To realistically make the skaterGirl move to the skateboard, we will put an invisible object on top of the skateboard and have skaterGirl move to that object. Click on Add objects. Go to the Shapes folder. Drag a box into your world. 9

Positioning the Box First, we want the skateboard and box oriented correctly. Right-click on the skateboard in the object tree. Select methods, turn to face, jump. Right-click on the box, select methods orient to, 10 skateboard, the entire skateboard

Using Quad View Now, click on quad view. Use the move arrow to position the box on top of the skateboard. Remember to hold down shift as you drag in order to move up or down. 11

Step Three: Properties – In the properties tab, set the box’s vehicle property to skateboard the entire skateboard – The vehicle property attaches an object to another object. They always move together Attaching objects together Now that we’ve positioned our box, we want it to stay next to the skateboard, wherever the skateboard moves. 12

Change makeJump Click on the makeJump method In the move to instruction, click on the arrow beside the skateboard. Change it to box because we want skaterGirl to move to the box, not the skateboard. Play your world now 13

Understanding vehicle property Click Done to exit the gallery. Drag Do together into the makeJump method. Drag the following into the Do together: Play your world.  See the next slide to see what went wrong 14

Right click on the box instruction and select disable Play your world to see the box move with the skateboard since the skateboard is The box’s vehicle 15 You can see the box move past the skateboard. We only need to move the object that is the vehicle, in this case the skateboard Now that you see how vehicle property works, delete everything in this Do together by dragging it up to the trashcan

Properties continued: Making an object invisible Now that the box is positioned and attached, we need to make it invisible. Click on the box in the object tree. Click on the properties tab in the details area Set isShowing to false 16

Finally, we can change the color of objects. Click on the cone in the object tree. In the properties tab, change the color to orange. Do this to every cone – You can even change the color of default Alice objects. For example, click on ground in the object tree and change it's color to green. 17

While skaterGirl is on the board, we want her to move with it, so we must change her vehicle property to skateboard Click on skaterGirl in the object tree. Click on the properties tab. Since we want her vehicle property to be changed during the animation, drag her vehicle property into the makeJump method. Set it to skateboard, the entire skateboard. skaterGirl Vehicle 18

Continue makeJump method Now, when the skateboard turns to face the jump object, skaterGirl’s head will turn right. Since we want this to happen at the same time, first, drag in the control statement, Do together Drag in skateboard turn to face, select jump. 19

Animating Parts Of Objects 20 To animate part of an object, expand the object in the object tree by the + Expand skaterGirl, upperBody, neck, Drag head into the Do together. Select turn,right, ¼ revolution. Set duration to 0.5 Result:

Next, (underneath the do together), drag in skateboard from the object tree. Select move toward, 1 meter, jump. Change the 1 meter so that the girl moves close to the board when you play your world I changed the amount to 7 meters. Then, click on more in the instruction and change the style to abruptly 21

Finish writing makeJump We change the style to abruptly so that there will not be a pause between each instruction Drag in the rest of the instructions underneath the Do together. The complete method is on the next two slidess.  Notice the change in style and duration of each instruction. Play your world when you finish 22

The makeJump method: 23 First drag in all of the instructions. Then change the duration and style appropriately See the next slide for the rest of the instructions in makeJump

makeJump Continued First drag in all of the instructions. Then change the duration and style apropriately Play your world

Call MakeJump Now we need to call our new method. Click on world.my first method. Click on world.myfirstMethod tab Drag in makeJump ‏ Change the event “When the world starts” back to my first method Play your world 25

Writing SkateCircle Click on world in the object tree. Click create new method, name it skateCircle, click OK Drag in the following code. *except turn to face whichever cone is closest to the “jump” object 26

Step Five: As Seen By To make the skateboard turn around the cone, for the final instruction in skateCircle: Click on more, select asSeenBy, cone2. 27

Call skateCircle Drag skateCircle underneath the instructions in world.my first method Play your world You may have to change the move forward amount in skateCircle

Create skaterGuy Celebrate First, click on skaterGuy in the object tree. In the details area, click on methods, create new method. Name it celebrate. Click OK Drag in a Do together. Then drag skaterGuy into the method. Select say, other. Type in “Wow, Awesome!”

From the control statements, drag Loop into the Do Together. Select 2 times. Rather than repeat code that we want to have happen more than once, we put it into a loop Drag a do in order into the loop. And then following:

Write skaterGuy.celebrate Drag in another Do in order into the Loop and the following. In order to access parts of an object, click on the + sign beside skaterGuy in the object tree: 06/24/09

Call skaterGuy.celebrate Click on the world.myfirstMethod tab. Drag skaterGuy.celebrate into the method above world.skateCircle 06/24/09

The End of Part Two Congratulations, this is the end of Part Two In Part Three, we will go over camera control and how to allow the user to interact with the animation