AllTheTimeWorld.com

aliceAlice Glossary

Alice Glossary

Arguments are values that are passed to a method.

An array is a list of objects, or other values.

Array lesson

As Seen By shows the world from one of the characters point of view.

As seen by lesson

This statement assigns a new value to a variable.

assign lesson

The color of the sky.

A sound can be played continuously in the background.

lesson

A billboard is primarily used to display images. This is a good way of creating a background for a scene, but the images are not 3D.

Billboards

A biped is a 3D character that stands on 2 feet. This includes all of the humans, but also a few animals such as the pig and a cat that stand on 2 legs.

A way to start a new project by choosing a ground texture: mars, ocean, room, grass, etc.

Boolean values have one of only two values: either true or false.

lesson

A bug is an error in a program. Debugging is the process of finding and fixing the errors.

Camel Case is the naming convention of starting a name with a lower case letter, then using an uppercase letter for each new word. Examples: userName, madHatter, badDude, etc. Names can not have a space, and camelCase is a way to separate words in a name to make it easier to read.

naming variables

Every Alice world includes a camera. The camera is point of view of the user of the Alice world. The camera can be changed to zoom in or out or even to move around with another object.

camera

After positioning the camera, you can save that position using a camera marker. You can use those markers in your code to focus the camera. This is one way of changing scenes.

A moving object can be the vehicle for the camera.

camera vehicle

A class can be described as the blueprint or template for creating an instance of the class.

In Alice, you can write code for what to do when the user Click the mouse. This is called an event.

mouse click event

Code is all of the statements that are part of the program.

code

In Alice you add and edit code in the code editor by dragging tiles into the code area.

A collision occurs when two characters move into each other. This event can be handled.

collisions

Color is one of the properties of objects that can be changed.

Comments start with //. Comments do not change the execution of the program, but are a very important tool for programmers. Comments are one way of documenting your code.

Comment: Comments are ignored by the compiler, but are a way to add notes for ourselves or other programmers.
Ideally, there should be a comment at the top of myFirstMethod giving your name and a description of the program.

Each procedure, function or block of code should also have a comment.

See lesson on adding comment

comments

A constant is a stored value that never changes. For instance, PI is a constant. Its value is 3.14159 and never changes.

constants

Control Structures are the blocks that control the order that statments are executed. It includes loops, do in order, do together, and if/else blocks.

Control Structures

The count loop is a control structure that lets you repeat a block of code a specific number of times.

count 1 2 3

A counter is a variable that is initialized to 0, then add 1 to it when the thing you are counting occurs.

counter

Crashing is when a program stops working.

crash

The depth is one of the properties of all 3D objects. Depth is the distance from the front to the back of a 3D object. The function getDepth is used to retrieve its current value. The setDepth procedure is used to change the value. The width, height and depth properties will stay in proportion.

Division is performed using the / operator.

division

Statements inside a do in order block are executed one after the other in sequence.

Statements inside a do together block are executed concurrently: all at the same time.

do together

Double is a variable type that has decimal places. Movements of the 3D characters are always expressed as double values. Example: 0.25, 3.0, etc.

The each in together control structure causes all statements inside this block to change all elements of an array at the same time.

Events are things that happen such as a user action with the mouse or keyboard, and also events such as a timer going off.

Event handling means writing code to specify what to do when an event (such as the user clicking the mouse) occurs.

lesson

A flowchart is a drawing that shows the steps in an algorithm.

flowcharts

Flyer is the class of objects that have wings. This includes penguins that don't actually fly in the real world.

A fog density of 0 is no fog, 1 is completely covered in fog with 0 visibility.

The for each in control structure is used to make changes to each element of an array, one at a time.

A function is a method that computes and returns a value.

functions

All Alice world start with a ground object. You can change this to a solid color, a texture such as grass, moon or dirt. You can also import an image to display instead of the other choices.

ground

Handles are used to position objects in the scene editor.

handles

The height is one of the properties of all 3D objects. The function getHeight is used to retrieve its current value. The setHeight procedure is used to change the value. The width, height and depth properties will stay in proportion.

Most modern programming environments allow you to create the program, edit it and run it from one application called the IDE Interactive (or Integrated) Development Environment. Older programming languages required you to work with several separate applications.

The if/else control structure lets you test a condition and execute one block of code if the condition is true and a different block of code (the else block) if it is false.

if

Alice allows you to import graphics and display them on billboards or as the ground. It also lets you import sounds and play them. If you are having problems with Alice crashing, you may want to keep these imports small.

Alice allows you to ask the user questions and input the response into a variable.

lesson

ALice must be downloaded and installed on your computer.

installation

An infinite loop is one that is never going to end. The control structure while(true) is an infinite loop. It is also called an endless loop.

In programming, inheritance means that you can create a base class, such as a quadruped, and then derive another class, such as an elephant, that inherits all of the properties of other quadrupeds, but it is extended to have additional properties, such as a trunk. In this example, Quadruped is the base class and Elephant is the derived class.

In Alice, when you declare a variable, you must select a type, give it a name, and an initial value, the initializer. The initial value must be of the type that is selected.

The gallery has a number of classes of 3D models. When you select one of the 3D models and drag it into the scene, you are creating an instance of that class. Only the instances that you add to the virtual world can be used in your code. You can have more than one instance of a class. For example, you might want 3 elephants. You could change some properties of them so that they don't all look the same.

An Integer is a whole number. It is one of the types that can be used in Alice. (A number with decimal places is a Double.) The number 3 is an Integer, but 3.0 is a Double.

Java is a programming language very similar to Alice code. In these lessons code is shown in Java style. Setting preferences for Java code will make it easier to follow these lessons.

java code

All of the 3D models have subparts that are connected together by joints. Moving, turning, and rolling these joints create animation. You can create code to make the characters walk, wave, roll over, swim, or flap its wings. In addition you can open and shut gates, car doors, and a treasure chest.

A loop is a control structure that repeats the code in its block. Loops in Alice include while, count and 'for each in'

Alice has two types of markers: Camera Markers and Object markers. Markers are used to store a location or position in the world. You can add and edit markers in the scene setup tab. Once you have added a marker, you can reference that marker in the code.

markers

Procedures and functions are methods. A procedure is used to perform an action. A function returns a value. Methods are an important way to organize a program, instead of putting all of the code in myFirstMethod.

When you add objects, variables and methods, you must give them a name. The names must follow a few rules and conventions.

naming

An object is any of the 3D models that make up the virtual world. It includes animals, trees, the ground, camera, props, and characters.

objects

Object markers are used to store a location in the world. You can add and edit markers in the scene setup tab. Once you have added a marker, you can reference that marker in the code. For instance, you might put a marker in front of the gate, and then have a character move to that marker at some point in the code.

markers

A 3D model can be posed in the scene editor using one shots. This is a good way of experimenting to find how much you need to rotate a joint or whether to roll or turn.

one shots

The opacity of an object can be set to 1 to make it invisible, or 0 to make it invisible. Values in between 0 and 1 can be used to make something translucent or to create a ghost.

Orientation is an objects position and direction in the world. Any movement of a object will be in relation to its orientation, not the viewer. If an object is facing to the right, moving it forward will move it to the right. If an object is facing up, moving forward will move it up towards the sky.

orientation

Parameters are the rules for the values that a method receives. For instance the "say" procedure has one parameter: a string, such as "Hello". When you call a method, the values that you provide are called arguments.

parameters

Every 3D object has a pivot point. When you write code to turn or roll an object, it will turn or roll around that pivot point. The pivot point for most characters is at the bottom, between the feet. The pivot point for a shere is in the center. You can figure out where the pivot point is by rotating it.

Poses are created by manipulating an objects subparts. For instance, to kick you would need to manipulate the hip, knee and foot to create a kicking pose.

poses lesson

Primitive methods are the procedures and functions that are available in Alice, such as turn, move, say, think, and getHeight. Methods for walking and swimming are not primitive, you must write those methods yourself.

A procedure is a method that performs and action. The primitive procedures include say, think and move. You can write additional procedures such as run or swim.

procedures

All objects have properties such as width, height, color, opacity, and position as X, Y, and Z. You can change these properties using procedures, or retrieve their values using functions.

Pseudocode is English sentences that tell what you want the program to do. When you are designing a program, you may write the sentence "The ball bounces" but in the actual code you would move the ball up, then back down the same amount.

Pseudocode

A quadruped is the class that stands on 4 legs. The quadruped class includes bear, dog, horse, elephant, dragon, etc. However, in the Alice world a pig (and a few others) is a biped and stands on 2 legs.

Alice has a few functions that return pseudo random numbers. Random numbers can be used to create games, and also to create more natural movements. For instance, when you walk, every step is not exactly the same size. Using a random number for the size of the step will make the movement more realistic. Instead of stepping a distance of exactly 1.1, you might use a random number between 0.9 and 1.2

random number lesson

Relational operators are the ones that are used to compare two values: < (less than), > (greater than), == (equal), != (not equal), <= (less than or equal), >= (greater than of equal)

A function returns a value. If you write your own function, the last statement must return a value.

An Alice world can have multiple scenes. All of the 3D models that are visible at one time is called a scene.

In Alice you will be working in either the scene editor or the code editor. In the scene editor, you add all of the 3D characters, you can pose them, change the size, adjust the camera angles, and create markers.

changes

A scene procedure is a procedure you create that is not a procedure for one of the 3D models.

scene procedures

A scene property is a variable that is available anywhere in your project.

In the scene editor there is a tab in the Gallery labeled Shapes/Text. Here you will find shapes such as disc, cone, cylinder, sphere, torus, and box. You will also find the billboard and the textModel. These objects do not have any subparts, but they can be moved and rotated and used in a variety of ways. For instance, the billboard can display images, the textModel can be used as scoreboard in a game, and the sphere can be colored red to create an apple.

In the scene editor, in the biped class, the first few people are Sim People. When you add a sim person, a dialog window lets you select skin color, hair color and style, gender, and face shape, as well as a variety of outfits.

sim people/a>

Sounds can be imported and played in Alice.

sound

The Slitherer Class includes a hermit snail, a long neck snail and nagi.

Array

When you start a new project there is a Starters tab that lets you select from several complete scenes. For instance, the lagoon has seaweed, shells, treasure chests, stacks of coins, sand castles, caves and a pirate ship already arranged.

A string is one of the types that are available in Alice. A string is a word or sentence. The say procedure requires a string as an argument. For example, "Hello" is a string.

Most of the 3D models have subparts that can be manipulated to create poses and animations. A biped has about 45 subparts such as neck, leftArm, rightKnee, rightPinkyFinger, etc. A bunny also has ears and tail that can be manipulated to make him wiggle his ears or shake his tail. A car also has subparts: you can open and shut the doors. A biplane has wings and propellers.

The Swimmer class has two subclasses: Fish and MarineAnimals classes. There are 7 different fish, and 5 marine animals, including a dolphin and a walrus.

When you start a new Alice project you can select from one of several templates such as grass, water, or Mars. You can easily change this in the scene setup window and there are more templates available.

start

The keyword "this" refers to whichever object is currently active.

You can set a timer to go off at a specific interval, then write code for what to do when that happens. This is called an event.

timer event

A variable (called an accumulator) can be used to find the total of several items.

total

The Transport class has 4 subclasses: Aircraft (6 models, including HotAirBalloon, Biplane, Helicoper and UFO), Automobiles (14 models), Trains (3 models) And Watercraft (5 models). All of these models have subparts that can be manipulated.

A Truth Table shows all possible values and what the result for each combination of values should be.

truth table

In programming, type refers to whether a value is integer, double, string, or some other category.

type

A variable is a named location that can store a value. A variable can have a primitive type such as Integer, Double, but the type can also be a Class such as paint color or Biped.

variables lesson

A vehicle is not the same as an instance of the Transport class. In Alice, a vehicle is an object that is assigned to another object so that they move together. For instance, we can make the Pixies hand the vehicle for the magic wand, then when the pixie moves her hand the wand moves with it. You can also make the UFO the vehicle for the camera. As the UFO soars around the mesa, the camera moves with it.

Vehicle: In Alice, a vehicle is not necessarily a car or train, but it could be. If you want the pixie to hold a wand, you position the wand in the pixies hand, then make the pixies hand the vehicle for the wand. When you move the pixies hand, the wand will move too. You can also set a vehicle using code.

See: penguin and egg, monkey holding banana.php

Monkey and banana

A method that does not return a value has a return type of void. A procedure is a void method.

A while block is a control structure that loops (repeats) while a condition if true. The statement while(count<5) will cause the block to execute until count is 5 or more. The statement while(True) will create an endless or infinite loop.

toddler counting

The width is one of the properties of all 3D objects. The function getWidth is used to retrieve its current value. The setWidth procedure is used to change the value. The width, height and depth properties will stay in proportion.

In Alice, you create a world, or virtual world, by adding 3D models, arranging them, selecting fog and other settings for the story you want to tell.

In a 3D world, each object has a position given as values for x, y, and z.

x

For the x position, 0 is in the middle, positive values are to the right, negative values are to the left.

y

For the y position, 0 has the pivot point on the ground, positive values are up in the air, negative values are buried in the ground

z

For the z position, 0 is in the middle, positive values are in the back, negative values are closer to the camera.