LiveWorld's virtual space consists of a hierarchical structure of objects called boxes (see figure 1.1). Boxes can be created and manipulated with the mouse; they are concrete and tangible graphic representations of underlying computational objects. The intent of the interface is to make the entire computational state of the virtual world available to the user in the form of boxes.
Boxes are named and can have values. If a box color is inside of a box turtle, then color is sometimes referred to as an annotation of turtle. Annotations can function like slots of standard object-oriented languages, so in the above example the value of the color box will be interpreted as a slot of the turtle. Boxes are sometimes referred to as frames, reflecting their underlying representation.
Some boxes represent graphic objects; these are called actors. Actor boxes are contained inside theaters, which present them in two separate views: a stage view which shows them in graphical form, and a cast view which shows them in the form of boxes. These two views are interconstrained so that changes in one are reflected in the other.
Boxes can inherit properties from a prototype. New boxes are often made by cloning an existing box, which just means making a new box with the original as prototype. Cloned boxes (also called spinoffs) inherit various properties from their prototype, such as values for slots. Inheritance is dynamic, meaning that changes in the prototype may affect the spinoff. The initial LiveWorld environment consists of specialized objects including theaters, actors, slots, sensors; users usually begin the programming process by cloning and combining these into a world of their own. After an object is cloned the new object may be customized by modifying any of its properties to be different from its prototype.
LiveWorld is programmed using an extension of Common Lisp. Since boxes are named and are in a hierarchy, they can be referred to by paths. There are two forms of box paths. The absolute form gives the name of a box starting from the top, or root, of the hierarchy. For instance, the path
#/theater-1/cast/turtle/color
names the color frame of a turtle inside the cast of theater-1. Relative boxpaths allow references to be made relative to a local box; these are explained in section 4.5.4.2.
A message passing language is defined on frames: The ask primitive is used to send a message to a box. For instance,
(ask #/theater-1/cast/turtle :forward 10)
will cause the named turtle to move forward 10 units. Boxes specify their responses to messages by means of methods, which are themselves boxes containing a program.
Specialized boxes called animas offer process-like capabilities. An anima repeatedly sends a :step message to its containing box, concurrently with other animas and user-initiated actions. Animas can be used as the basis for building agents.