SimpleGameInAlice1 Barb Ericson Georgia Institute of Technology June 2008 Creating a Simple Game in Alice.

Slides:



Advertisements
Similar presentations
Create a Simple Game in Scratch
Advertisements

Game Making with Alice Eat the Hay Game
Mike Scott University of Texas at Austin
Visual Lists By Chris Brown under Prof. Susan Rodger Duke University July 2012.
Space Man Sam: Grammar Mistakes By Aleis Murphy Duke University, Under the direction of Professor Susan Rodger July 2010.
Create a Simple Game in Scratch
Adventures in Animation Alice – Advanced! Michelle Venable-Foster June 2006.
Lets Play Catch! Keeping Score in Alice By Francine Wolfe Duke University Professor Susan Rodger May 2010.
Skater World: Part Four By Deborah Nelson Duke University Under the direction of Professor Susan Rodger June 2009.
Harry Potter Scratch Game
Lights Camera Action! Part 3: BDE Events By Deborah Nelson under the direction of Professor Susan Rodger Duke University July 2008.
Class-Level Variables in Alice By Jenna Hayes Under the direction of Professor Rodger Duke University, July 2008.
Wizard Game: Class-Level Variables in Alice By Jenna Hayes Under the direction of Professor Susan Rodger Duke University, July
Creating a 3D Interactive Story Prof. Susan Rodger Duke University Feb. 24, 2007.
Extending the Pong Example Barb Ericson Georgia Tech June 2011.
Princess & Dragon Part 4: Breathing Fire—Adding Effects to Alice By Elizabeth Liang under the direction of Professor Susan Rodger Duke University June.
01-Intro-Object-Oriented-Prog-Alice1 Barb Ericson Georgia Institute of Technology Aug 2009 Introduction to Object-Oriented Programming in Alice.
Line up By Melissa Dalis Professor Susan Rodger Duke University June 2011.
Variables and Functions Chapter Variables Named storage location in computer’s memory Programs may need to store data when running o Stored in.
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
Making a Timer in Alice.
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.
Introduction to Arrays. definitions and things to consider… This presentation is designed to give a simple demonstration of array and object visualizations.
Alice 2.0 Introductory Concepts and Techniques Project 1 Exploring Alice and Object-Oriented Programming.
The Very Basics of Alice: A Simple Overview 6 th & 7 th Grade Tech Apps.
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.
Animating Objects in Groups: Using Arrays and Lists By Ruthie Tucker under the direction of Professor Susan Rodger Summer 2008.
By Melissa Dalis Professor Susan Rodger Duke University June 2011 Multiplication Table.
Lesson 9B Adding sound and Billboards. What is a function? Give an example. How do you create a method? Give an example. What is an event? Give examples.
A Simple Quiz: Ask User Functions. By Lana Dyck under the direction of Professor Susan Rodger Duke University June 2009, added Part 2 July 2011.
Georgia Institute of Technology Pictures and Alice Barb Ericson Georgia Institute of Technology September 2006.
Making a Timer in Alice By Jenna Hayes under the direction of Professor Susan Rodger Duke University July
Piñata Game: Keeping Score in Alice By Maggie Bashford Professor Susan Rodger Duke University July
1 ball, 2 ball, red ball, blue ball By Melissa Dalis Professor Susan Rodger Duke University June 2011.
Georgia Institute of Technology More on Creating Classes part 2 Barb Ericson Georgia Institute of Technology Oct 2005.
Can I get your number? By Melissa Dalis Professor Susan Rodger Duke University June 2011.
Creating a Simple Game in Scratch Barb Ericson Georgia Tech June 2008.
Balancing the scales: Inequalities By Melissa Dalis Professor Susan Rodger Duke University June 2011.
Create a Halloween Computer Game in Scratch Stephanie Smullen and Dawn Ellis Barb Ericson October 2008.
Tutorial for Arrays and Lists. Description This presentation will cover the basics of using Arrays and Lists in an Alice world It uses a set of chickens.
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.
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:
The Essentials of Alice By Jenna Hayes under the direction of Professor Susan Rodger Duke University May 2009.
Making Billboards By Deborah Nelson Duke University, Under the direction of Professor Susan Rodger, July 14, 2008.
Creating a Simple Game in Scratch Barb Ericson Georgia Tech May 2009.
Creating a UFO Rescue Game in Alice
By Melissa Dalis Professor Susan Rodger Duke University June 2011
Create a Halloween Computer Game in Scratch
Skater World: Part Four
A Simple Quiz for Alice 3.2:
Let's Race! Typing on the Home Row
Creating a UFO Rescue Game in Alice
Learning Java with Alice 3.0 Game Design Kathy Bierscheid
Michelle Venable-Foster Barb Ericson Jan 2007
A Simple Quiz for Alice 3.2:
Checking for Collisions: Using Functions in Alice
Introduction to Object-Oriented Programming in Alice
Learning to Program: Part 3 Camera Control, Invisibility and 3-D Text
Creating a Simple Game in Scratch
under the direction of Professor Susan Rodger
Restricting Events Creating Conditional Events in Alice By Henry Qin
Presentation transcript:

SimpleGameInAlice1 Barb Ericson Georgia Institute of Technology June 2008 Creating a Simple Game in Alice

SimpleGameInAlice2 Objectives Show how to create a simple game in Alice –Creating methods in Alice –Creating a field or property of an object –Creating a variable –Using a while loop –Creating a Boolean function –Creating a comment

SimpleGameInAlice3 Things to Consider All objects in an Alice movie or game must be created before the game starts –you can make them invisible to start click on properties and set the opacity to 0 –you can also hide objects by moving them under the ground move down some amount You can update a field (property) in an object to track if it has been clicked on

SimpleGameInAlice4 Click the Zombie Game While the user hasn't won hide the zombie and after some random amount of time between 1-3 seconds have it pop up in a random place. If the user clicks on the zombie increment the number of hits and when it reaches 5 let the user know s/he won If the user doesn't click on the zombie within 1 second hide it again Add instructions at the beginning to let the user know how to play –and then make them invisible after some amount of time

SimpleGameInAlice5 Set-up the World Click on File -> New World Select the Template tab Click on the grass world –click on open

SimpleGameInAlice6 Add Objects to the World Click the add objects button at the bottom of the scene Scroll to the City category and click on City Add some Buildings by dragging out some building clusters

SimpleGameInAlice7 Add the Zombie Click on Local Gallery to get back to the list of categories Open the People category Scroll over to Zombie and add one to the world

SimpleGameInAlice8 Hide the Zombie Create a method to hide the zombie –Click on zombie in the object tree –Click on methods in the details window –Click the create new method button –name the method hide

SimpleGameInAlice9 The hide method Click on properties in the detail window Drag out opacity = 1 (100%) Put it in the hide method Change the opacity to 0 (0%) Click on methods Pull out zombie move down 2 meters

SimpleGameInAlice10 Create the pop up method Click on methods Click the create new method button name the method popUp –move the zombie randomly –move the zombie up above the ground –make the zombie visible

SimpleGameInAlice11 Move the zombie randomly Start by dragging out zombie move tiles –one for each of left, right, forward, and backward Click on world in the object tree to select it Click on functions in the details window Drag out random number and drop it on the 1 meter –select 0 for min and 2 for the maximum

SimpleGameInAlice12 Add a comment You can add a comment to explain what you are doing in English Drag a // tile from the bottom of the method editing window to where you wish to place the comment –Click on the down arrow –Select other –Type in the comment

SimpleGameInAlice13 Showing the zombie Click on zombie in the object tree to select it Click on methods in the details window Drag out a zombie move tile –select up 2 meters Click on properties in the details window Drag out opacity = 0 –change to 1 (100%)

SimpleGameInAlice14 Adding a property (field) We need to store the number of hits on this zombie Click on the properties tab Click the create new variable button name the variable numHits –set the value to 0

SimpleGameInAlice15 Increment the number of hits If the user clicks on the zombie we want to add 1 to the number of hits so far Create a method that does this –It should be a new zombie method

SimpleGameInAlice16 Respond to mouse click on zombie In the events window click the create new event button –select When the mouse is clicked on something Change the anything to the zombie (the entire zombie) Change the nothing to zombie incrementHits

SimpleGameInAlice17 Method to run the game Click on world in the object tree Select methods Pull up a while tile from the bottom of the editor window –select true Click on functions –drag out a < b and drop it on true select 1 and 1

SimpleGameInAlice18 While number of hits < 5 Click on zombie in the object tree Click on properties –drag out numHits = 0 and drop on the first 1 Change the second 1 to 5 –click on other and enter 5

SimpleGameInAlice19 Hide and wait a random amount of time Click on methods Drag out hide Drag up a wait tile from the bottom of the editor window –select 1 second Click on world in the object tree –click on functions –drag out random number and drop on the 1 second

SimpleGameInAlice20 pop up and wait for 1 second Drag out a zombie popUp Drag up a wait tile and select 1 second Try it out! –What happens after you click on the zombie 5 times?

SimpleGameInAlice21 Tell the user s/he won Add some 3D text that tells the user she or he won –Click on File and then on Add 3D Text –Type in the text you can change the font Place it where you want it to appear –Click on add objects to get to the mouse controls –Click on done when done

SimpleGameInAlice22 Make the text invisible to start Click on the text in the object tree Click on properties –Modify opacity to 0

SimpleGameInAlice23 When the user wins show the text Drag out opacity = 0 to the method –change to 1 (100%) Play the game!

SimpleGameInAlice24 Speeding things up All animation takes 1 second by default –you can change this using the more… Make the zombie move up or down and become visible and invisible at the same time –use a do together from the bottom of the editor window

SimpleGameInAlice25 Add instructions Create 3D text that tells the user what to do in the game When the game starts wait for 1 second –then make the text invisible can set isShowing to false

SimpleGameInAlice26 Show the number of hits Create 3D text that says Hits and one that says 0 Click on the 0 in the object tree –Click on properties –Drag out text = 0 select default string Use the mouse controls to position the text –Click on Add Objects to see the mouse controls when done click on done

SimpleGameInAlice27 World incrementHits method Add an incrementHits method to the world –call the zombie incrementHits method –click on 0 then properties drag out text = 0 –select default string replace the default string with the what as string function in the world to convert the number to a string choose expressions and pick zombie numHits as what to convert

SimpleGameInAlice28 Change when mouse clicked Modify then when mouse is clicked on the zombie to call the world's incrementHits method Try it!

SimpleGameInAlice29 Other Ideas Have the zombie play a sound when hit –modify zombie incrementHits method –use play sound in methods you can also record your own sounds –click on properties for the zombie –click on the + next to Sounds –and record a sound and name it Count the number of times the zombie has appeared Add a way to lose –maybe it will only run till it appears 10 times –maybe add a timer and a time limit –maybe add other objects that if you click on these you lose Make the amount of time you give the user to click on the zombie a random amount from 0.5 to 1 second

SimpleGameInAlice30 Summary Alice can be used to create simple 3D games Concepts covered –creating methods –creating a property (field) –creating a variable –using a while loop –creating a comment