You don't have to read all this. If you know Croquet, skip to the bottom and
download the .st file. It makes a project called "Croquet-Q", and adds an
icon "QPot" to the Croquet objects pallete.
The following is historical brainstorming -- It does not describe exactly what was built...
A few years ago in the basement of the
Centre Pompidou (Beaubourg) in Paris (a modern art museum)
there was an art exhibit with a computer screen in which
a stream of incoming shapes could be deflected, reflected,
twirled, tweaked, or frobulated in other ways by various
objects that you instantiated by dragging them from a
palette on the edge. It was fun to play with. Figuring out
what each object did took a bit of experimenting, but the
display quickly builds to a frenetic jumble of moving shapes
as you try stuff out. This was all 2D.
(I wish i had a reference to this. I know I wrote down
the artist's name, but that was too long ago, during
I'd like to do something similar to this in 3D using
<-- ( if that download is disabled, use this cache of the download -->
Current limitations (Croquet0.3 a.k.a. Jasmine) are that
TObjects must exist in the virtual images before multiple players
connect to each other.
[Wrong -- see Schwas's reply below]
This can be arranged by pre-allocating
all TObjects we might use, even if they are unmapped.
The state of the world is easy to describe, with the motion of
all objects being described by a position at a starting
TeaTime and a velocity.
Whatever change is made to a ball in motion when it passes
through a frobbing object should be idempotent -- it
doesn't matter many nodes
change the moving ball's state to the new state, and any
other nodes can receive the updated state from others
without having to recalculate it.
The Croquet Avatar moves in 2D, but may manipulate objects in 3D.
However the vision of the avatar is somewhat constrained, so
most action should occur somewhat near the ground. There
could be gravity, or the ceiling and walls could reflect,
or wrap like a torus. Reflection off the ground and
(if there is no gravity) probably the ceiling seems a good choice.
Of course we should try do to this with only subclassing existing
(14:37:15) poet: they frobulated?
(14:37:37) poet: can you find out the artist
(14:37:40) poet: that made the display?
(14:37:48) frob: i have no idea how
(14:38:06) frob: search would be hard
(14:38:12) poet: yeah
(14:38:15) poet: you'd have to call them up
(14:38:16) poet: and ask
(14:38:18) frob: it was a minor exhibit -- a single computer or two, in the basement
(14:38:23) poet: ah
(14:40:13) gpig: what do i have to do to see this thing
(14:41:01) frob: download Croquet0.3 (a.k.a. Jasmine) for mac, win, or linux
(14:41:22) frob: read tutorials about how to use mouse
(14:42:23) frob: don't expect everything to work -- it's a "developer only release", so you have to learn a bit
(14:44:14) gpig: i'm not exactly sure what any of this is but it sounds interesting
(14:45:35) frob: please try it!
(14:46:51) frob: You must choose the "Croquet0.3.image" when you run the binary. On linux, edit the last line of Croquet.sh to make it 0.3.
(14:48:13) frob: Then choose the "First Steps" tile, then the "Croquet" bubble, and DRAG the TeaTest or Teapot icon to the MIDDLE of your window.
Strick summarises Schwa's replies:
- "Current limitations" is inaccurate. All images must contain the same objects to start, but new ones can be created as the world progresses.
- Re: "any other nodes can receive the updated state from others without having to recalculate it"... Idea of Croquet networking is to allow machines to deterministically proceed in parallel, and only send user-caused events across the wire. Events caused by progress of the simulation don't need to be sent.
- If simulation is deterministic, and if user events are interjected at the same places in between simulation events, then everything stays in sync.
- We need a bit of a time lag to coordinate message order before applying user events in a replicated fashion.
- We think latency will be acceptable.
- All messages are sent into the future, ordered, then executed.
Try A Snapshot:
HOWTO download and run a snapshot:
- Download the .st file from this bottom of this web page. Save it somewhere like /tmp/.
- Download the Jasmine release of Croquet 0.3 from http://www.opencroquet.org/Croquet_Technologies/downloads.html --
either the "windows .zip" or the "linux .tgz" will do for Windows, Linux, or Mac.
Don't bother with "Croquet.exe" in the top directory; it doesn't work.
Go into the "bin" directory and run "Squeak.exe". After several seconds it will want to know an image file;
tell it "Croquet0.3.image" in the top directory.
Edit the last line in "Croquet.sh" to change "Croquet0.1.image" to "Croquet0.3.image".
Then run "sh Croquet.sh &" to launch.
Run "Croquet.app". Apparently it only runs "Croquet0.1.image", so you should probably rename "Croquet0.3.image"
to "Croquet0.1.image" ( and also the .changes ) first.
- Once it's running, Go to the First Steps project.
- On the background, left-click, choose "open..." then "file list".
- In the File List browser, click on the "tmp" in the top left pane, then on the .st file in the top right pane.
It may help to first click the "name" button at the top.
- Click the "filein" button at the top.
- In the Green Objects panel ( background left-click "objects" ), choose Croquet, then drag QPot icon
to the center of your screen.
- If the Teapot hangs a long time while opening, use ALT-. (ALT and period) to unfreeze it, and Abandon any debuggers
( background, left-click, "do...", "Utilities closeAllDebuggers.").
On newer versions of QPot,
you must click on the box in the corner to start the cannon!
Use your right button (on linux & windows) (on a one-button machine, hole down CTRL) to move.
It is your
mouse's relative position to the orange crosshair
in the center of the viewport that determines which way you move.
Use the left button to manipulate things. Drag the rectangular obstacles with left mouse.
Also hold down SHIFT to rotate them.
Use CTRL-A to switch between four cameras.
- Multiplayer on a LAN:
It's most fun with multiple people. They can be on any combination of Macs, Windows, or Linux,
but they must be on the same LAN (same ethernet) because broadcast UDP packets and TCP
connections are used.
- You must disable firewalls on the computers!
Linux: "iptables -F" (as root). Windows2000: it's in the TCP stuff, marked "Advanced".
- Your hostname must not resolve to 127.0.0.1.
Linux: Use "hostname" to find your hostname. Be root. Change it with "hostname rabbit".
Put a line "192.168.0.88 rabbit" in /etc/hosts (substitute your current IP address, from ifconfig).
Then restart X11! (Ctrl-Alt-Backspace).
- Follow instructions in http://minnow.cc.gatech.edu/croquet/33
of the game: Move the magic carpets around and have fun. Try to attack or defend the
red or blue endzone. Try to trap balls in the corner with the cannon.
Try to spell something from above. Change some configuration constants in
class QPitch. Subclass new kind of carpet to do something
different. Instantiate QPitches in other spaces where they don't belong.
Fly helicoptors, blimps, or giant snorlaxen into the Q pitch.
- Instantiating: To create a qpitch in a space,
" self meta addChild: QPitch meta new. " doit.
You can only create one per space, because the pitch and the cannon want to live at coordinate (0,0,0).
You must fix bugs to do otherwise.
More Hints for LINUX
- Turn firewalls off! "iptables -F"
- Assign a unique hostname, not "localhost".
- Add that hostname and its IP address to /etc/hosts. Don't use 127.0.0.1
- Assign that IP address statically, or hope your DHCP-allocated IP is stable.
- Restart X after assigning the hostname.
- You must have OpenGL version 1.3. Graphic accelleration helps a LOT.
I use NVIDIA GeForce graphics cards, priced $60 to $100.
Download NVIDIA's driver and install it.
I have no experience with ATI or other graphics cards.
- However even without graphics acceleration, the Q game is usable.
I get 2 to 5 frames per second on a 750MHz Pentium II laptop with no fancy graphics card.
- The "glxgears" program will test your OpenGL.
- I've edited "Croquet.sh" for you; it used to be hardwired for the virtual image
Croquet0.1.image ; now it defaults to Croquet0.3.image, but you can
override that on the command line: "sh Croquet.sh myWork.image"
- On many debian-based distros, including Knoppix and Morphix and Ubuntu,
the libopenal.so* files are a broken symbolic link. Use "ldd" on the
files in the bin/i686-pc-linux-gnu/ directory to see if all needed
shared libraries can be found.
- On some computers I get errors when OpenAL tries to open /dev/dsp (Device Busy).
I'm still clueless about this. I've even disabled KDE and Gnome and all fancy stuff.
OpenAL (3D Audio Library)
To run the "OpenAL" Croquet demo (a toy helicopter buzzing around in circles), you need
openAL driver and squeak plugins:
- For Linux:
<-- copy this into the Croquet0.3/bin/i686-pc-linux-gnu/ directory.
Also install the "openal" package -- with Fedora Core 4, this works:
yum -y install openal
- For Windows:
<-- copy this into the Croquet0.3/bin/ directory
Snapshots of my "Q game":
In the Croquet part of the Objects palette, run QPot.
See class comment (the [?] button) in class QPot for bugs & hints.
Bug Fix for Unix
<-- File this in before running TeaPot, if your change level is 280. (It fixes
the capitalization on this file path: 'Content/Mars/MasterTerrain.ASE'
CDROM Released by Strick at PhreakNIC9 Conference
Apply this to Strick's Q-game and the collisions will be recalculated when you change a carpet's possition.