The Incredible Machine and other simulations

Ned Konz ned at bike-nomad.com
Mon Oct 22 20:49:29 UTC 2001


I was just playing Sierra's game/construction set called "Return of the 
Incredible Machine: Contraptions". For those who don't know what it is, it is 
a construction set for "Rube Goldberg"-type contraptions.

For instance, you might make a system in which a baseball falls, turning on a 
power switch, which runs an electric fan, which turns a pinwheel, which is 
connected via a belt to a jack-in-the-box, whose opening propels a bottle of 
nitroglycerin into a wall, ...

It's presented as puzzles, with some pieces possibly already anchored, and a 
parts bin with some more pieces. You're told to produce some kind of effect 
(like "make the bowling balls go into the laundry baskets"), and you do it by 
placing and connecting the parts as needed.

When you hit the "Start" switch, object interactions start being computed. 
You can "Stop" the simulation, or "Reset" it, which returns objects to the 
position (and state) they started out in.

I was wondering what it would take to make this kind of simulation work with 
the existing EToys system. What is probably needed is to repeatedly 
evaluate the effect of each object on each other object that it interacts 
with (for instance, many objects are affected by gravity, so the base class 
might well have a mass and motion vector). I don't think a general constraint 
system is needed for this; I suspect that the usual Morphic stepping would be 
adequate.

Some objects only interact with other kinds of objects: things that move air 
(fans, candles, bicycle pumps) interact with only a few other objects 
(propellers, pinwheels, blimps and balloons, etc.)

Some objects are only affected by nearby objects: when something like a ball 
falls past a light switch that's in the UP position, the light switch gets 
turned on.

Ropes, belts, and pulleys complicate the job of doing this in Morphic, though 
my Connectors could probably be used.

Many objects have different appearance for different states (like a mouse 
wheel that's turning or not).

What I envision is a system that would provide some pre-built objects, and a 
way to make new ones using the EToys system.

The part I'm puzzled over is how to represent the interaction in an 
EToy-friendly way. Each _kind_ of object can potentially interact with each 
other _kind_ of object. These interactions would probably be best to be 
inherited. I don't know how much support for inheritance there is in the EToy 
system, though (it appears that you can duplicate a Morph with its scripts, 
but I don't know how to inherit).

One idea that I had was to make a 2D spreadsheet-like Morph whose row and 
column headings would be the names of the individual Morphs in the master 
parts bin, and the cells would be buttons that would open a script editor for 
each possible interaction (Pinwheel>>interactWithFan: aFan and/or 
Fan>>interactWithPinwheel: aPinwheel). Of course, most of these would be 
no-ops.

But it doesn't look like the scripts can take parameters. This could be taken 
care of by assigning a slot (otherObject or something) when evaluating 
interactions.

I figure that this would be a great way to teach about (for instance) force 
and acceleration, as well as providing a fun system to play with.

Has anyone done something like this or thought about doing it in any detail?

-- 
Ned Konz
currently: Stanwood, WA
email:     ned at bike-nomad.com
homepage:  http://bike-nomad.com




More information about the Squeak-dev mailing list