This is a read-only archive. Find the latest Linux articles, documentation, and answers at the new!

Feature: Programming

Learn OOP while creating 3-D animations with Alice

By Mayank Sharma on December 25, 2007 (4:00:00 PM)

Share    Print    Comments   

College computer science students often find it difficult to get started in programming languages like C++ and Java, largley due to the disconnect between simple middle-school languages like logo and advanced object-oriented programming (OOP) languages. To help bridge the gap, researchers at Carnegie Mellon University (CMU) have developed an OOP language to create computer animations using 3-D models, called Alice.

The team of researchers at CMU led by Randy Pausch examined several C++ and Java beginning computer science texts. Some of the essential concepts they found taught are decisions, repetitions, recursion, functions/methods, collections (typically arrays, though sometimes lists), objects (including state and behavior), inheritance, encapsulation, polymorphism, and so on. Alice provides an environment that introduces students to these concepts as they modify 3-D objects and write programs to generate animations.

Installation and getting started

A nice thing about Alice is that you don't have to be enrolled in college to try it. Alice is available along with its source code for users of Linux, Windows, and Mac. Alice 2.0 is the latest version of the software, which is developed in Java and requires the Java Runtime Environment (JRE). Linux users can download the JRE and follow the installation instructions to get it working. I tried Alice 2.0 on Fedora 8, which includes IcedTea, the free software implementation of Sun's open source Java development kit, OpenJDK.

Once you have the Java environment set up, download the 100MB+ Alice tarball and extract it with tar zxvf Alice-2.0.0.tar.gz. To use Alice, navigate to the extracted Alice/Required/ directory and run the run-alice file by either double-clicking it from the GUI or typing ./run-alice on the command line.

Alice includes four tutorials to help you get started with the software. A typical Alice environment includes a virtual world and a bunch of objects. You can animate the objects or add more using your mouse in Alice's drag-and-drop environment. Alice bundles seven example worlds with different levels of complexity.

Each object in Alice encapsulates its own data (private properties such as height, width, and location) and has its own member methods. It's not only easy to add objects in the world, but also to create your own methods that take parameters, and trigger these methods with different events.

Programs in Alice include functions, variables, parameters, and recursion. These can all be created with a mouse click. You can "drag in" other programming elements to the environment, such as conditional if/else statements, do while, and for loops, along with wait, print, and even comment statements. You can also accomplish complex tasks like concurrent programming by dragging in a "Do Together" element.

By simplifying these tasks, Alice helps students understand the control structure and logic of programming instead of being confused by the syntax. By not getting lost in the punctuation, students can focus on objects and other features of OOP.

Alice makes OOP fun without dumbing down the program structure and semantics. It does so by packing a syntax switch. You can tweak Alice's preferences (Edit -> Preferences) to display the code of your animation in Java syntax instead of Alice's default easy-to-understand syntax.

Watch Alice's promotional videos for an overview of the program's interface to see how it's helping students get started with OOP.

Limitations and Alice 3.0

Alice has a few drawbacks as well. Despite the Java syntax switch, Alice developers admit that it still doesn't help students develop a detailed sense of syntax. Another issue is that Alice doesn't support polymorphism directly. The Alice FAQ mentions a couple of workarounds, "but they aren't nearly as elegant as the solution you're looking for."

To get younger middle-school students into Alice, Caitlin Kelleher created Storytelling Alice as part of her doctoral work at CMU. This version of Alice, which works only on Windows, focuses on story-based social interactions between the objects, and aims to teach the concepts of OOP by building a story.

According to Kelleher, some of the concepts of Storytelling Alice will be used in the next version of Alice. Gaming company Electronics Arts will underwrite the development of Alice 3.0, and also provide characters from the popular game The Sims to replace the objects of Alice 2.0 that were created using 3-D Studio Max. Additionally, Alice 3.0 will also include the ability to extend Alice-created animation with Java in an integrated development environment (IDE).

Alice is an innovative application designed to help students grasp the concepts of OOP. If you're new to programming, give it a try; mastering its syntax doesn't take much time.

Share    Print    Comments   


on Learn OOP while creating 3-D animations with Alice

Note: Comments are owned by the poster. We are not responsible for their content.

Bellarmine College Preparatory in San Jose, California uses that!

Posted by: Anonymous [ip:] on December 26, 2007 07:15 AM
I remember learning Alice with Mr. Lindemann. Go Bells!


Why is this on

Posted by: Anonymous [ip:] on December 26, 2007 07:28 AM
'This version of Alice, which works only on Windows,.....'

Then why is the article on


Learn OOP while creating 3-D animations with Alice

Posted by: Anonymous [ip:] on December 26, 2007 09:22 AM
Reading the whole article might do a little good. "Storytelling Alice", a side project, is Windows-only.

(1) Alice itself is available for Linux.
(2) Alice 3.0 (which will be available for Linux like its previous versions) will include parts of Storytelling Alice.


Learn OOP while creating 3-D animations with Alice

Posted by: Anonymous [ip:] on December 26, 2007 02:10 PM
I installed Alice and Storytelling Alice a few weeks ago. I started my nine year old on Storytelling Alice then tried to move him to Alice. He prefers StoryTelling Alice. I have heard that the Alice CM team are going to make Alice 3.0 more like StoryTelling Alice than Alice.


Learn OOP while creating 3-D animations with Alice

Posted by: Anonymous [ip:] on December 27, 2007 02:34 AM
I had a brief look at Alice a few years ago in my computer science concepts class. Recently, I have learned my school plans to use Alice as a teaching tool for computer science majors. I absolutely hate this idea. Alice is a great way to demonstrate the work that programmers do in a visual way. However, I personally think that the time I spent exploring Alice was time wasted. My opinion is that people should learn languages such as python first. It is easy to understand, and it forces you to write readable code, while being object oriented and providing a good method for people to write real world applications. People can see what they are doing. And understand how it works.


Learn OOP while creating 3-D animations with Alice

Posted by: Anonymous [ip:] on December 28, 2007 12:37 PM
i just saw a demo of storytelling alice at washington university, and it was pretty neat tech. still very beta, mind you, but very cool and useful to get kids interested in programming early...


Can't Wait

Posted by: Anonymous [ip:] on January 07, 2008 03:23 AM
I'm a 33-year-old who has been deep into technology, but has struggled with the best way to learn how to program. Hopefully this is a start?


This story has been archived. Comments can no longer be posted.

Tableless layout Validate XHTML 1.0 Strict Validate CSS Powered by Xaraya