BDE tutorial By Deborah Nelson Duke University Under the direction of Professor Susan Rodger July 13, 2008.

Slides:



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

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,
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.
Exploring Events. Try this Start Alice and create a blank world using the grass template. Add an instance of a BlueBallerina. Add an instance of a PinkBallerina.
Creating a 3D Interactive Story Prof. Susan Rodger Duke University Feb. 24, 2007.
Alice Learning to program: Part 1 Scene Setup and Starting Animation by Ruthie Tucker and Jenna Hayes Under the direction of Professor Susan Rodger Duke.
Methods Tutorial: Part One By Deborah Nelson Duke University Under the direction of Professor Susan Rodger June 9, 2008.
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.
Making a Book Report in Alice by Jenna Hayes Under the direction of Professor Susan Rodger Duke University, June 2010.
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.
Skater World: Part Two By Deborah Nelson Duke University Under the direction of Professor Susan Rodger June
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.
3–D Helium Molecule Tutorial Alice Project Duke University Professor Susan H. Rodger Gaetjens Lezin June 2008.
Checking for Collisions: Alternative Method Erin Taylor Under the Direction of Susan Rodger July 2015 Duke University.
Alice 2.0 Introductory Concepts and Techniques Project 1 Exploring Alice and Object-Oriented Programming.
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.
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
CompSci 4 Fall 2010 Classwork 2 – Princess and Dragon World By Elizabeth Liang under the direction of Professor Susan Rodger Duke University.
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.
Skater World: Part Two By Deborah Nelson Duke University Under the direction of Professor Susan Rodger June 1,
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.
1 Quiz Template: Using the ‘ask user’ functions By Deborah Nelson Duke University Under the direction of Professor Susan Rodger July 2009.
Balancing the scales: Inequalities By Melissa Dalis Professor Susan Rodger Duke University June 2011.
Simple Collision Detection By David Yan Under the direction of Professor Susan Rodger and Chari Distler Duke University, June 2015.
Creating a 3D Interactive Story Prof. Susan Rodger Duke University July 19, 2007.
Changing Camera Views! Part 1: Set Point of View to By Bella Onwumbiko under the direction of Professor Susan Rodger Duke University July 2013 Updates.
Learning to Program: Part 1 Scene Setup and Starting Animation by Ruthie Tucker and Jenna Hayes Under the direction of Professor Susan Rodger Duke University,
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.
Repetition everywhere – comparing while in a method and as an event Susan Rodger Duke University July 2010.
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.
Princess & Dragon Part 3: A Knight Comes Riding In—Cameras & Events By Elizabeth Liang under the direction of Professor Susan Rodger Duke University June.
Presenter: Carol Liss Timberlane Regional Middle School 6 th and 7 th grade Tech. Educator Co presenters:
Making Billboards By Deborah Nelson Duke University, Under the direction of Professor Susan Rodger, July 14, 2008.
Professor Susan Rodger
An Introduction to Alice (Short Version)
Teaching Characters to Walk: Learning Methods, Part 1
Changing Camera Views! Part 1: Set Point of View to By Bella Onwumbiko
Bunny Eat Broccoli Repetition – Simple loops and Conditional loops
Making Objects Move in Unison: Using Lists
Skater World: Part Three
Making Objects Move in Unison: Using Lists
Methods Tutorial: Part Two
Making Objects Move in Unison: Using Lists
Checking for Collisions: Using Functions in Alice
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:

BDE tutorial By Deborah Nelson Duke University Under the direction of Professor Susan Rodger July 13, 2008

Loading the World Open a new world, with any template Save it in a directory that you can find again. First: After you have opened the file go into the "Layout" mode by clicking on the green button Add Objects (toward the middle of screen) Click more controls. Click drop a dummy at the camera. Rename the dummy 'originalPosition.' To leave the layout mode, click done

Adding Objects The objects we will add are in the ocean folder in the web gallery: OceanFloor, Shark and LilFish2 OR in the local gallery, use the shark and lilFish from the Animal folder

How to add objects to your scene 1)First, drag the oceanFloor into your world 2)In order to add the shark and lilFish2: drag each into your world instead of clicking on add instance 3)As you drag each object in, BEFORE you release the mouse, hold down the shift key and move your cursor forward (into the scene) until you see the yellow outline box 4)If you still can’t see your objects, drag the oceanFloor away from the camera. Move the fish up and then move your oceanFloor back

Writing the method Create a world-level method named sharkChase Drag the following instructions into the method:

Creating a BDE Click on create new event Select while something is true This event is a while loop with three parts: – Begin, – During – End

The BDE: the conditional The first step in writing a BDE is the conditional. We want this loop to run while the shark is more than one meter away from the lilFish. Click on world in the object tree and go to functions. Drag a>b on top of the

The conditional (cont) Select 1 for a and b (as placeholders). Click on shark in the object tree Click on the functions tab Drag the shark distance to function on top of the first 1. And in the drop down, select lilFish2, the entire lilFish2.

The BDE: the Begin The very first time this while loop is passed, we want the shark to say: Where are you?. From the object tree, drag the shark on top of the Nothing beside Begin. Select the say method and other. Type in: Where are you?

The BDE: the During Every time the while loop is passed, we want the sharkChase method to be called. Click on world in the object tree and click on the methods tab. Drag world.sharkChase onto the Nothing beside During.

The BDE: the End The very last time the while loop is passed, when the shark is 1 meter away from the fish, we want the shark to say: Gotcha Drag the shark say method on top of the Nothing beside End. Select other and type in: Gotcha.

Re-setting the BDE conditional Play your world. The while loop only happens once. Let’s create a way to reset the conditional Click on create new event and select Let the mouse move Click on Any Object and select create new list

An event to move the objects Name the list animals With type object Add the shark and lilFish2 as the new items.

Play your world Now when you play your world, after the shark says Gotcha, click on either the shark or the lilFish2 and move it around the screen. Then, the BDE loop will happen again.  To move the objects up or down, hold down the shift key while you click  To change the direction the objects are facing, hold down the control key while you click

Write a new method In the methods tab of the world details panel, click create a new method. Name it fishCircle Drag the following code into your method:

Another event type Create new event – while something is true An empty BDE should appear in your event editor Right click on this event and change it to when something becomes true

When something becomes true: the conditional In our world, the conditional is: when the fish distance to the shark is less than 1 meter Add the conditional to your event to look like this: This event is useful because sometimes, we only want something to happen once instead of called again and again in a loop.

When something becomes true Drag in a Do in order on top of the Nothing in this event. Drag wait 0.5 seconds and the fishCircle method from the world details panel into the do in order Play your world

Recap of BDE A BDE is a type of while loop The Begin will only occur the first time through the loop The During occurs every time the while loop is being iterated through The End will only occur the last time through the loop In your world, it is useful to have something to reset the conditional of your BDE Or, you can change your BDE to when something is true when you don’t need a loop, then it only happens once