Download presentation
Presentation is loading. Please wait.
1
Alice 2.2 Introduction
2
Who is Alice? 3-D programming environment
Introduction to object oriented programming Drag & Drop REAL PROGRAMMING!
3
Who is Alice? The World Events Objects Program Code Methods
We’re going to skim over parts of this for now and come back to it either later today or in a subsequent lesson. The World – This is a camera view of what you’re building. Objects – Everything in your world. Methods – A list of what the things in the world can do. Program Code – You can use the methods to make your world more complicated. Events – Lets your world respond to you. Program Code Methods
4
The World To edit the world you’ll click on the green Add Objects button. Click Here
5
The World Object Controls The World Camera Controls Object Library
The World – Where you interact with objects in your program Camera Controls – Lets you move the camera around to change the view. You’ll also be able to do this with code later. Object Controls – The 7 buttons let you change how objects are moved. Left to right -> Free movement, up and down only, spin horizontally, spin vertically, change size, duplicate. Object Library – All of the 3d objects that you can add to your world. Object Library
6
Adding Objects Click Find an object you want to add to your world and click it. A screen will come up with information on that object including any methods that it already has. Click Add instance to world to add it to your world.
7
open firstWorld.a2w Open Alice and open the firstWorld.a2w file. Go ahead and add a few objects to your world and practice moving them around in the scene. One thing you might find helpful is the quad view. It will better show you where your objects are in relation to each other than the 3d view.
8
Object Properties Objects have properties that let us change how they look We can also change the properties by dragging them into the code window One special property to pay attention to is the vehicle property. If you set one object as the vehicle of another then every time you move the first object the second will follow.
9
Object Methods I am an object!
Methods are things that an object knows how to do. takeTest waitForBus textMessageFriend walkGirlfriendToClass As a student you have certain things you know how to do – your methods. Things like walk girlfriend to class, take test, text without teacher knowing.
10
Object Methods To use a method you drag it from the object details method tab over to the code window. Depending on the method you may have options that pop up. Also notice the create new method button. We’re going to come back to that in a later lesson.
11
open bessieTheCow.a2w Click on Bessie and drag code from her methods list into the code window to make her perform a trick. Bessie has a couple of special methods already built in (walk, walkTowards, & tailSwish). Those are specific to Bessie. But everything below the create new method button are methods that all objects have. Go ahead and play with Bessie’s properties as well. See what you’re able to change. Add another object and set its vehicle to Bessie. Move Bessie and see what your other object does.
12
Bounding Box Shows you the direction of forward, up, and right for this object. Where the 3 lines intersect is the object’s center and it will rotate around that point. Click on an object to turn on its bounding box.
13
Subparts Allows you to move the individual pieces of an object.
Each object is made up of subparts, and each of those subparts can move independently. Each subpart also has its own methods so your code can move them.
14
Start work on Alice Labs
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.