Introduction to Alice Michelle Venable-Foster June 2006 Adventures in Animation What is Alice? • Alice (software), is a freeware introductory object-oriented programming software produced by Carnegie-Mellon, an educational programming language. Alice uses a drag and drop environment to create computer animations. • It is named after Lewis Carroll’s Alice in Wonderland! Adventures in Animation What is Alice? • You can create animations using 3-D models that can move around a virtual world! • The latest version of Alice can be downloaded for free at: www.alice.org Adventures in Animation What Kinds Of Movies Can We Make? • There are two types of animations that we can make: – Movie – the user just watches the animation. This is called passive. – Interactive – the user types on the keyboard or uses the mouse to make events happen. Adventures in Animation What’s Coming? • EA has agreed to help underwrite the development of Alice 3.0 – a popular, object-oriented, Java-based computerprogramming environment created by Carnegie Mellon researchers – and provide essential arts assets from “The Sims™” – the best selling PC video game of all time. Adventures in Animation Compare Current Alice With Sims Alice! Current version of Alice New version of Alice! Adventures in Animation Let’s Get Started! • You should first locate the Alice folder on your computer and double-click the Alice icon that looks like this: Adventures in Animation Let’s Get Started! • You will see the Welcome to Alice! dialog box - Adventures in Animation A Little Techno-speak! • The Welcome to Alice! dialog box is in front of the Alice Integrated Development Environment (IDE). • An IDE is a computer program that is used to write other computer programs. • The Alice IDE is sometimes called the Alice interface. Adventures in Animation Let’s Look At Some Examples! • Click on the Examples tab at the top of your Welcome to Alice! dialog box. Adventures in Animation Let’s Look at Some Examples! • Spend the next few minutes viewing the examples in Alice. Click on the animation you want to view, and click on the Open button. • When the world opens up, click on the Play button: Adventures in Animation Let’s Look At The Tabs • The Welcome to Alice! dialog box has five tabs: Tutorial, Recent Worlds, Templates, Examples, and Open a world. Adventures in Animation The Tutorial Tab • Click on the Tutorial tab. • You will see 4 tutorials. We won’t be doing these now, but, you can come back to them during any “free time” we have, or at home. • When you are ready to view a tutorial, you can either click on the Start the Tutorial button or directly on one of the tutorial screenshots. Adventures in Animation The Recent Worlds Tab • Click on the Recent Worlds tab. You will see screenshots of the most recently saved Alice worlds. • If no worlds have been saved since Alice was installed on your computer, this tab will say no recent worlds. Adventures in Animation The Templates Tab • Click on the Templates tab. You will see 6 blank templates for starting a virtual world – dirt, grass, sand, snow, space, and water. Adventures in Animation The Open a world Tab • We’ve already looked at the Examples tab, so let’s click on the Open a world tab. • This is the tab you will use to access other worlds saved to your computer. Adventures in Animation Let’s Make A Movie! • Let’s jump right in and start making our own animation! • You can get back to the original screen by choosing File > New World. • If you’re asked to save the world you were viewing, just say no. Adventures in Animation Choose Your Background! • Just to get us started, choose one of the templates for your virtual world. Doubleclick the background you want to play with. • It’s not really important which one you choose now; this is just to get your feet wet! Adventures in Animation Let’s Add Some Objects To Our World • For right now, think of an object as anything that can do something! • Click on the Add Objects button – Adventures in Animation Let’s Add Some Objects To Our World • You will see a Gallery of objects that you can add to your world. Make sure to scroll to the right to see all of the available galleries. Adventures in Animation Let’s Add Some Objects To Our World • Select a category and look at the different objects that you can add. • You can get back to the main level by clicking on Local Gallery. Adventures in Animation Create Your Own Person! • If you choose the People category in the Local Gallery and scroll all the way to the right, there are two icons called hebuilder and shebuilder. Adventures in Animation Create Your Own Person! • If you choose either one of these, you will bring up the Person Builder dialog screen. • You can “create” your own person using your mouse and the choices for each body part and clothing item available! • When you’re done, make sure to give your person a name and type your own name next to the box that says, Created By. Adventures in Animation Adding Objects To Our World • Once you’ve chosen which object you’d like to add to your world, select it by clicking on it and then clicking the button that says, “Add instance to world”. Adventures in Animation More Techno-speak • We are going to be created our animations using an object-oriented program, so we need to discuss what that means! • We are going to discuss what a class, an object, and methods are. Adventures in Animation Techno-speak • A class describes what an object of a particular type is made of, what is knows about itself and what it can do. • A class is merely a description. It is like a plan for a house. Before you build a house, you should have a plan. Once you have a plan, however, you can build any number of similar houses. • Some examples of classes are Houses, Students, MP3 Players, etc. Adventures in Animation Examples of Classes • Dog – it knows its name, size, breed it can bark, eat, sleep • Song – it knows its title and its artist it can play • Cat – it knows its name, size, breed it can meow, sleep, purr Adventures in Animation All About Objects • What an object “knows” about itself is its instance variables or properties. Each instance (copy of the object) has its own instance variables. • What an object “can do” is its methods. • What instance variables and methods might a Television have? Adventures in Animation Back To Alice! • If you click on the (+) sign next to the name of the object that you’ve added to the world, you will see all of the parts that your object is made of: Adventures in Animation 3 Dimensions, 6 Directions • Each object has height, length, and depth • It also has 6 directions in which it can move: Adventures in Animation Modify Your Object • You can modify the instance of your object by using these tools: • Using these tools you can, Move Objects Freely, Move Objects Up and Down, Move Objects Left and Down, Move Objects Forwards and Backwards, Tumble Objects, Resize Objects, and Copy Objects – just by using your mouse. • Spend the next few minutes experimenting with these tools. Adventures in Animation Modify Your Object • You can undo or redo your last moves by clicking on the appropriate buttons: Adventures in Animation Deleting An Object Right-click on the object and choose delete. Watch the object spin away! (click on picture to see movie!) Adventures in Animation Posing Your Object You can move just one part of your object by either clicking the box next to affect subparts, and moving it with your mouse, or by choosing the part you want to move in the Object Tree. Adventures in Animation Let’s Make Our Object Move! • The first thing you need to do is make sure that you have an object in your world! • Click on the big button. This will return you to the standard Alice interface. Adventures in Animation Let’s Make Our Object Move! • To make objects move in your world, you need to use methods for the objects. • Every method has two parts: the name of the object associated with the method (which comes before the period) and the name of the method itself (which comes after the period.) Adventures in Animation Let’s Make Our Object Move! • Click on the name of the object in the Object Tree you’d like to move: Adventures in Animation Let’s Make Our Object Move! • Make sure that you click on the Methods tab in the Details section. Adventures in Animation Let’s Make Our Object Move! • Find a method you want to use and drag it out to the middle of world.my first method in the Editor area. • A short menu may ask you for more information, such as, direction or amount you want to move. • Information that you must give to a method whenever you use that method is called a method parameter. Adventures in Animation Play The Movie! • I know we haven’t done too much so far, but, let’s test our animation by playing the movie. • Click the Play button near the upper-left corner of the Alice interface. Cool, huh? • Click the Restart button to play the world again, and then click Stop to return to the Alice interface. Adventures in Animation Advanced Coding Techniques • You can group methods by using the commands at the bottom of the Editor area. • Do in order – will run the code one after the other • Do together – will run the code at the same time. Adventures in Animation Moving Code • You can move lines of code by dragging the dotted left-hand corner of the block. • The move that you’re attempting is “legal” if you see a green bar! Adventures in Animation Deleting Code • You can delete lines of code in two different ways: 1. You can drag the line of code into the trashcan icon. 2. You can right-click on the line of code that you want to delete, and select delete. Adventures in Animation Let’s Make Our Object Move! • For the next few minutes, I want you to experiment with Alice by using the methods available for the object in your world. • When you get something cool, please let me see it! Adventures in Animation Posing An Object • You can “pose” an object by right-clicking the object in the Object Tree and selecting Methods and choosing the pose you’d like! Adventures in Animation Quad Views • In the Object Editor screen, you can choose Quad View, which will give you 4 different views of your object at the same time! Adventures in Animation Quad View • You can click and drag on either of the views to see what you object looks like at all 4 views! You can also Zoom and Move the view. (click on the picture to see a movie) Adventures in Animation Camera Controls • The curved arrow on the right is the camera’s tilt control. It is used to tilt the camera up or down, similarly to the way that you might tilt your head up or down. Adventures in Animation Camera Controls • • • • The center control is a mixed control, to zoom and pan the camera. A camera can zoom in and zoom out, and pan left and pan right. Zooming in means the camera is moved in closer to get a tighter shot of something. Zooming out means the camera is moved out farther to get a longer shot of something, so that it becomes smaller on the screen. Panning means to turn the camera left or right without moving the position of the camera, although it is possible that you could pan and move at the same time. In Alice, you can pan and zoom at the same time. Adventures in Animation Camera Controls • The left set of arrows at the bottom of the world window is the move control, which provides controls to move the camera left and right, and up and down, while the vertical arrows in the center set move the camera forward and backward. Adventures in Animation Adding Sounds! • Most of the objects in Alice have the ability to play a sound! • Locate the method that says object.playSound • You can either play one of the sounds in the Alice library or import one of your own! Adventures in Animation Importing Sounds! • Using the drop-down menu, select Import Sound. • Navigate to the sound file on your computer that you’d like to use. • You can only use .wav or .mp3 audio files in Alice animations. Adventures in Animation Recording Sounds! • You can record your own sounds to use in Alice by selecting record new sound in the drop-down menu. • Give your sound file a name, so you will be able to find it later. • When you’re ready, press the record button and speak into the microphone! Adventures in Animation Create An Animation! • For the rest of the afternoon, you are to create your very first original animation in Alice. • Try to either tell a story, entertain your audience, or create an interactive movie. • Remember to be appropriate and spell your words correctly! • Save your animation as Lastname_Alice1. Adventures in Animation
© Copyright 2024