Showing posts with label Alice. Show all posts
Showing posts with label Alice. Show all posts

Sunday, July 19, 2009

Alice's Default Examples

Comparing the visual interfaces, I would vote for Scratch instead of Alice :-D ... Scratch's interface is strongly selfexplanatory i.e. for learning Scratch you just need a short introductory stuff and then you can continue the process by trying examples / exploring Scratch environment by yourself. Alice is (a bit) different. I think the role of the textbook is quite important to accellerate the learning process. But, ofcourse, this depends on user experience / background.

Well, ok, go back to the title :-D ... Alice 2.2b comes with 6 default examples (see below). But looking at these examples, if you are a newbie, I would suggest that you begin with the "textbook" examples (when you download Alice, there are packages with this "textbook-examples" version). But, ok, it also depends on you .. :-D


Beginning Alice - 6


The last tutorial (Tutorial 4) showed us how to create our own scenes (new worlds + some objects), to position objects in the scene (incl. copy, rotate), and to move the camera. I think, it is quite straight forward, oder ?

Beginning Alice - 5


The third Alice tutorial focuses on events. It covers a basic understanding for "events" and also how to create key-type and mouse-click events. It is said, with the tutorial we should learn (1) how to make Alice worlds respond to mouse clicks and key-presses; (2) change method when the world starts; (3) add new events e.g. to make the penguins sing their song when we press a key on the keyboard, to make each of the penguins sing their note when we click on them [note: in that world only penguins know how to sing, others will remain silent if we ask them to sing :-D], and to record/play back the penguins' song.

There are three types of Alice events used in this tutorial:
  • When the world starts

  • When a key is pressed

  • When the mouse is clicked on something -- with expressions parameters

Personal notes: I experienced some program crashes as I tried to run scenarios with embedded sounds. I'm still not sure, whether it is a general thing or only related with my hardware. To cope with this, I separately installed the Java3D and JMF packages and open the JMStudio whenever I run Alice (Alice v2.2b). Who knows, maybe it also works for you :-D

Saturday, July 18, 2009

Beginning Alice - 4


If we look at the details area of a world object from samples/tutorials in Alice, we might see that it could consist of an arbitrary number of (world-level) methods. So how does Alice know which method shall be executed if a user plays the scenario? Well, yes, event!

When a user clicks on the Play button in Alice, this triggers a "the world starts" event. If we look in the upper-right region of the Alice window above, you will see that when the world starts, the program will call a method associated with this event i.e. in this case, "world.my first method".

Beginning Alice - 3


The second tutorial ("Defending Naptime") concentrates on methods i.e. on : (1) how to make new methods; and (2) how to open and modify methods. At this stage, it should be noticeable that the methods in Alice have the following three generic forms:
  • World.method_name

  • Object.method_name

  • Object.ObjectPart.-etc-.method_name

Beginning Alice - 2

Alice comes with four default interactive tutorials. In the first tutorial some basic functionalities are covered: (1) a quick tour of the Alice interface; (2) basic editing and playing the "World"; and (3) changing object's routines.


If we look at the details area, at the beginning, the tutorial starts with a single world method called "my first method" containing two object methods: "IceSkater.prepare to skate" and "IceSkater.do simple spin". At the end of the tutorial, we will have three additional object's methods making the animation (slightly) more complex:
  • IceSkater.prepare to skate

  • IceSkater.skate

  • IceSkater.do simple spin

  • IceSkater.skate backwards

  • IceSkater.jump

Just try it! :-D

Wednesday, July 15, 2009

Beginning Alice - 1

Maybe in the first two posts in this thread I'll only address some intro materials without experimenting with the Alice environment directly. 


Again, What Is Alice?
  • A modern programming tool

  • 3-D objects, automatically keeps track of: Which objects are in virtual world, Types of objects, Positions of objects in the world

  • Animation: Objects can be made to move in world

  • Written in Java – runs on PC and Mac

  • A Program for building virtual worlds populated by 3D objects; Objects in Alice can move, spin, change color, react to the mouse, & more.

Alice Elements:
  • Virtual world: Started by playing a virtual world; Can play like a movie, or played like an interactive game; Developing a world begins with a template (e.g. ground & sky)

  • Object: Objects are added to the world (e.g. a person, a robot, a ball); Objects are chosen from a gallery of 3D models; Objects are commanded to do things

  • 3D Model: Created by Alice developers; Is a blueprint for objects – size, color, actions, …

  • Programming: Build methods containing commands for objects; Build methods to respond to events

  • Event: Pressing a key on the keyboard, etc.

Alice:
  • Emphasizes programming fundamentals: Programs are composed of methods; Methods contain Alice instructions; Objects are asked to do things they know how to do; Events can trigger execution of program components

  • Programs always run

  • The Alice editor is user-friendly: its a smart editor with visual drag & drop features

Kinds of Animations:
  • Movie: Passive user watches the animation; "machine-centric"

  • Interactive: Active user clicks on mouse, types a key on keyboard …make into a game - "user-centric" & "event-driven"; Actions of user are called events

Setting up a World:
  • Gallery is used to obtain objects

  • Mouse is used to approximately position objects in the scene

  • Camera Navigation is used to set the camera point of view

  • Drop-down menu methods are used to: resize objects & position objects in the scene

  • Quadview is used to: position one object relative to another object & precise positioning of objects in the scene

An "object" is any thing that can be identified as unique from other things. How is an object unique? Well, ok,  it has a name; it has properties (width, height, color, location); it can perform actions / methods (associated actions it can perform; tasks it can carry out).

Objects are categorized into classes. Each object is an “instance” of the class. All objects in a class: Have similar properties; Generally can perform the same tasks.

A 3D object has 3 dimensions (height, width, depth) & 6 degrees of moving-freedom.



In Alice, each 3D model is a class of objects: e.g. chicken, chicken2, chicken3 & it has colors (red, white, blue, grey, black, etc.). Objects Have Multiple Parts that are moveable.


Alice Interface:
  • World window

  • Object tree

  • Details area

  • Editor area

  • Events area

Tuesday, July 14, 2009

Alice: A Visual 3D Programming Environment

Alice is a 3D interactive animation environment but also a tool for teaching fundamental (object oriented) programming concepts. The Alice system is developed at Carnegie Mellon University. The Alice Project, which is based at CMU, is actually a multi-university initiative, and the Alice Team is a collaboration among faculty, staff and students.

Alice is a programming environment that allows students to learn basic computer science while creating animated movies and simple video games where students control the behaviors of 3D objects and characters in a virtual world.

Alice: (1) Visible Data, and No Syntax! (2) Creating Movies and Games as a Motivation for Programming

In Alice, students construct programs by dragging and dropping tiles that represent words in a programming language; Alice removes the possibility for syntax errors, a common source of frustration for beginning programmers. Students can watch their programs execute, which enables students to see where they have made mistakes. Unlike many programming environments for novices, Alice allows students to gain experience with all the programming constructs typically taught in programming courses.




The Alice gallery contains more than 700 characters and objects (2008?)


The Alice approach:
  • Uses 3D graphics to engage students

  • Has a “smart” drag-and-drop editor that prevents syntax errors

  • Appeals to wide audience: Storytelling (young women, minority students), Interactive computer games (young men), Not threatening; Alice builds students’ confidence



Key Alice features:
  • Makes objects something students can see and relate to

  • Has a java syntax mode to ease the transition to C++/Java/VB.net




Uebrigens, Why is it called Alice?
First of all, it's not an acronym: Alice isn't A.L.I.C.E, and it doesn't stand for anything. The team named the system "Alice" in honor of Lewis Carroll, who wrote Alice's Adventures in Wonderland and Through the Looking Glass. This honors a man who was both a great author of children's literature and a great mathematician. Just like the people who built Alice, Lewis Carroll was able to do the really complex technical stuff (high level mathematics and logic), but he knew that the most important thing was to be able to make things simple and fascinating to a learner.