Under the direction of Susan Rodger

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.
Alice Learning to program: Part 1 by Ruthie Tucker and Jenna Hayes Under the direction of Professor Susan Rodger Duke University, July 2008.
Getting Started With Alice By Ruthie Tucker under the direction of Prof. Susan Rodger Duke University, July
Coloring Randomly: Random Selection in Alice By Jenna Hayes under the direction of Professor Susan Rodger Duke University July 2008.
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.
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.
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.
Working with Numbers in Alice - Converting to integers and to strings - Rounding numbers. - Truncating Numbers Samantha Huerta under the direction of Professor.
by Chris Brown under Prof. Susan Rodger Duke University June 2012
Shorter of two objects and changing color V2 Functions, events and setting the color in sequence and randomly This is a modification of the Changing Color.
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.
Introduction to Arrays. definitions and things to consider… This presentation is designed to give a simple demonstration of array and object visualizations.
Camera Control: Learning to Use the Camera in Alice By Henry Qin, edited by Jenna Hayes under the direction of Professor Susan Rodger Duke University,
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.
Scene changes By Deborah Nelson Duke University Under the direction of Professor Susan Rodger June
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,
Balancing the scales: Inequalities By Melissa Dalis Professor Susan Rodger Duke University June 2011.
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 Four By Deborah Nelson Duke University Under the direction of Professor Susan Rodger June 1, 2009.
Headshots in Alice Duke University Professor Susan H. Rodger Gaetjens Lezin July 2008.
Under the direction of Susan Rodger
Jonathon Kuo Under the Direction of Dr. Susan Rodger
Creating a UFO Rescue Game in Alice
By Melissa Dalis Professor Susan Rodger Duke University June 2011
The Essentials of Alice (Bunny)
Getting Started With Alice: The Basics
Skater World: Part Four
Professor Susan Rodger
A Simple Quiz for Alice 3.2:
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.
An Introduction to Alice (Short Version)
Teaching Characters to Walk: Learning Methods, Part 1
Comparing objects and changing color
Changing Camera Views! Part 1: Set Point of View to By Bella Onwumbiko
Making a Timer This is an modification of the July 2008 timer tutorial by Jenna Hayes By Natalie Huffman Under the direction of Susan Rodger Duke University.
Changing Color, Using Text Objects, and Random Selection in Alice
Making Objects Move in Unison: Using Lists
Let's Race! Typing on the Home Row
Creating a UFO Rescue Game in Alice
Skater World: Part Three
Adding and Manipulating Objects
Making Objects Move in Unison: Using Lists
Memory Matching Challenge
A Simple Quiz for Alice 3.2:
Under the direction of Susan Rodger
Objects in Alice: Positioning and Moving Them
Learn a bit about Computer Science Duke Femmes Event with Prof
An Introduction to Alice
Getting Started With Alice
Learning to Program: Part 3 Camera Control, Invisibility and 3-D Text
Tutorial for Arrays and Lists
Professor Susan Rodger
Headshots in Alice Duke University Professor Susan H. Rodger
Professor Susan Rodger
Getting Started With Alice: The Basics
Alice and Daisies: Positioning and Moving Objects in Alice
Lesson One: Objects in Alice: Positioning and Moving Them
Professor Susan Rodger
Making Objects Move in Unison: Using Lists
Presentation transcript:

Under the direction of Susan Rodger Scene Changes This is an modification of the June 2009/July 2012 scene change tutorial by Deborah Nelson and Chris Brown By Natalie Huffman Under the direction of Susan Rodger Duke University June 2017

Overview This tutorial is centered around the use of the full range of the camera to construct different scenes in the same world The camera can then shift between scenes, giving the coder the ability to make a more complicated world You will learn how to control the light levels in Alice, and how to move a character between scenes

Open a new Alice world Choose “Grass” Go to setup scene Add a camera marker Name it scene1

Camera Markers in Alice 3 Camera markers let you save a viewpoint Above the scene buttons are two positioning buttons The black camera represents your current point of view The first button moves your point of view to the red camera (scene1) In order to move to scene2, you would click on the scene2 button and then on the left top button Note: this picture is from later in the tutorial

Camera markers, cont. The second button, if clicked, would reset the scene1 view to the current view Do not click this button! Once we set a camera view, we will likely not want to change it Change scene1 camera Change current view

Add to our scene! First, we want to add an oasis Go to the “Browse Gallery By Theme” tab Click on southwestnew Pond Drag the Pond(DESERT_OASIS) into the scene and position it so it is near the bottom middle of the screen

Now to add a character Get back to the main theme page by clicking on the “all themes” button Click on wonderlandnew Alice Drag Alice (WONDERLAND) into the scene and position her by the oasis

Finished scene1

The first scene is complete Use the circled arrow to turn the scene to the right Keep turning until the oasis is no longer visible Now we can begin our second scene Before you do anything else, add another camera Name it scene 2

Cameras in Alice 3 Cameras in Alice 3 are physical elements that show up on your screen So as you turn, the side of the scene1 camera will come into view It should be the same color in the scene as it is under the camera marker tab (red by default) When you actually run the scene, these will not be visible! However, you will have to be careful to avoid them while doing positioning, as they can be clicked and dragged

Adding elements Go back to the main theme page Click on amazonnew RiverPiece Drag the new RiverPiece (CURVE1_BLUE) into the scene Add another Alice to the scene (wonderlandAliceAlice(WONDERLAND))

In order to position these elements, you may have to use the arrows to reposition, so that you do not accidentally click on the scene1 camera Try zooming backwards or up to get a better angle

Finished scene2

Double check! Once you are satisfied with your positioning, make sure you go back to scene1 to double check that the river is not visible! Because the river turns, it may intrude on the first scene. If this is the case, simply move it slightly further to the right 2) Then click here 1) Click here first

Scene3 From scene2, continue to turn right until the river is no longer visible Go back to the main theme page Click on snownew IceMountain Drag the IceMountain (DEFAULT) into the scene Add and position a third Alice

Finished scene3

Final touches The three Alices we have added will act as placeholders for position We then want a fourth Alice, who will move continually through all the scenes Go to scene1 and add a fourth Alice

We want Alice4 to be the only visible one Use the list of scene elements on the far left to change Alice, Alice2, and Alice 3 to invisible This is done by changing the Opacity to 0

Time to code! Click the “edit code” button to go back to the code screen First, we will create a scene variable Go to the dropdown menu SceneAdd Scene Property

Value type: Other typesColor Name: storeAtmosphereColor Initializer: WHITE

Now add a scene procedure Name it “fadeOut”

Fadeout This procedure will darken the screen so we can change the scene without the viewer seeing Drag in a do together block Drag in setAtmosphereColor and set to BLACK NOTE: This is NOT the variable we created, which can be changed with setStoreAtmosphereColor

Drag in setFromAboveLightColor and setFromBelowLightColor and set both to BLACK

Testing! Go back to myFirstMethod Drag in fadeOut and play! You should see the screen darken until you can no longer see the scene

fadeIn Create another scene procedure and name it “fadeIn” Click on the add parameter button Set the value type to Color and the name to “atmosphere”

Drag in a do together block Like before, drag in setAtmosphereColor, but this time select “atmosphere”, the variable we just created Drag in setFromAboveLightColor and setFromBelowLightColor and set both to WHITE

Now to create the scenes! Make a new Scene procedure and name it scene1 Drag in a do together block Select Alice4– this should be the only visible Alice Drag in a moveTo and select Alice (this should be the Alice in scene 1) Then drag in an orientTo and select Alice again

Drag in a say block and type “Put everything you want to happen in scene1 in this method.”

We want to repeat this code for scene 2 and scene 3 Right click on the do together block and select copy to clipboard Create another Scene procedure, and call it scene2 Click and drag from the keyboard to the procedure

Change the mentions of Alice to Alice2 Drag in or copy over the say block, and say “Put everything you want to happen in scene 2 in this method”

Scene 3 Create a final Scene procedure and call it scene3 Repeat the process Make sure to swap out the 2s for 3s!

Use your procedures Go back to myFirstMethod Drag in a do together Select this.camera and drag in moveAndOrientTo, and select scene1 Then select this.ground and drag in setPaint You will be given a list of setting options Since our first scene is an oasis, we want the ground to be sand

Finally, select this and drag in setStoreAtmosphereColor Note that this is not setAtmosphereColor, this is the variable we created Select BLACK, then go to the functions tab and drag in getAtmosphereColor in place of BLACK Note that getAtmosphereColor is not the variable we created

Drag in scene1 Drag in fadeOut Test your code! Scene 1 should play, then the screen should fade to black

Repeat for scene2 In a do together Have this.camera moveAndOrientTo scene2 Have this.ground setPaint to Jungle Drag in fadeIn, and select storeAtmosphereColor as the parameter Drag in scene2 And then fadeOut Try to write this code for yourself before you look at the picture on the next slide

storeAtmosphereColor Why are we bothering with this variable? All storeAtmosphereColor holds is the original color of the atmosphere In the fadeOut procedure we turn the atmosphere black In fadeIn we turn it back to the original color The reason we need storeAtmosphereColor is that the original color of the sky is not one of the color options Alice provides

Give it a try Set the fadeIn parameter to one of the other colors You can see how it changes the sky color None of them are quite the same shade of blue storeAtmosphereColor keeps us from losing that sky color!

Last scene We will repeat the code for scene 2, except for scene 3 In a do together Have this.camera moveAndOrientTo scene3 Have this.ground setPaint to Snow Drag in fadeIn, and select storeAtmosphereColor as the parameter Drag in scene3 And then fadeOut

Final code

If you want to change one of the sky colors, just change the fadeIn parameter! For example, we might decide that mountain sky looks sort of grey and cloudy If we chose a moon scene, we might want to set the fadeIn color to black

Extra Things Try making more than three scenes! You can just keep turning the camera Add more to the individual scene procedures. Make a story! The current code fades in before Alice gets positioned, so we see her move. How would you change the code so that Alice is already in position when the lights go on?