Croquet SDK notebook

From uvvy

Jump to: navigation, search

Open Croquet

The most mature application based on Open Croquet is Qwaq Forums

Qwak Forums


So I restarted playing with Croquet after a few months. I found out that the reference website is now the Croquet Consortium website - it will replace the old website which is not updated anymore. I also found out that the Croquet Collaborative runs a shared hosted Croquet world that can be visited by remote users.

Croquet Collaborative


NOTE: I just copied this notebook from an older website. I restarted Croquet tests recently and look forward to finding out what is new.

The Croquet 1.0 SDK beta wes released on April 21. First download the Croquet SDK beta from http://opencroquet.org/ and unzip it to a directory. The directory contains a manual in PDF, I am writing here what I have found by trial-and-error.

Open Croquet

For Windows: start by launching the executable Croquet, which does "@start bin\Croquet.exe Croquet1.0.11.image".

Go to First Steps and try dragging one of the examples to the empty part of the screen.

If it does not work and you see a string of error messages, you probably don't have an OpenGL driver. Find it on the net (google something like "opengl driver your-graphic-card OR your-laptop") and install it. For some examples you also need an OpenAL driver.

If it works move around by right-click and drag.

To do things with the example window (e.g. move, resize, close), alt-left-click it for a menu.

The manual explains the code of the Croquet (Master) example. I am learning by modifying it. To find and edit the code discussed in the manual:

Click on an empty part of the screen.

Open - package pane browser.

Choose: Croquet - Islands - SimpleWorld.

Make some changes in the code in the last panel, e.g. initialize, makeFloor, etc.

Right-click on the code editing window - Accept.

Right-click on an empty part of the screen - Save.

If you run the Croquet (Master) example you should see the changes that you have done. I changed the floor tiling and the image of Alan Kay with one of my dog.


Open Croquet

To edit and play the Simple Demo (Master) example:

Click on an empty part of the screen.

Open - package pane browser.

Choose: SimpleDemoMorph - Worlds - SimpleDemoWorld.

Make some changes in the code in the last panel, e.g. initialize, makePyramid, etc.

Right-click on the code editing window - Accept.

Right-click on an empty part of the screen - Save.

If you run the Simple Demo (Master) example you should see the changes that you have done. I changed the floor tiling and the skybox textures.

Open another instance of the SDK on another computer on the LAN or the same computer (this is what I did, I only have one computer good enough for Croquet). Run the Simple Demo (Master) example on the other instance. Connect each world to the other (Tools - Connect to another world). Now in each world you have a portal where you can see the other world. I changed avatar in one of the two world and imported a simple object (Tools - Import Object) created with 3dsmax and saved as .ase. See picture above.


To create a new world based on the Simple Demo:

Click on an empty part of the screen.

Open - package pane browser.

Choose: SimpleDemoMorph - Worlds - SimpleDemoWorld.

Change to:

  • BaseWorld subclass: #MyScape1
  • instanceVariableNames:
  • classVariableNames:
  • poolDictionaries:
  • category: 'NewScapes-Worlds'

Right click - Accept.

Now you have the new category NewScapes and subcategory Newscapes-Worlds (first two panels), and the subclass MyScape1 in the third panel.

Choose: SimpleDemoMorph - Harness - SimpleDemoMaster.

Change to:

  • CroquetParticipantWithMenu subclass: #MyScape1Master
  • instanceVariableNames:
  • classVariableNames:
  • poolDictionaries:
  • category: 'NewScapes-Harness'

Right click - Accept.

Now you have the new subcategory Newscapes-Harness (second panel), and the subclass MyScape1Master in the third panel.

Switch to category NewScapes and create content in all panels equivalent to the corresponding content of category SimpleDemoMorph (with the names changed). Careful - in the third panel you must also edit "class", not only "instances". To create content in the fifth panes, copy from the corresponding content of category SimpleDemoMorph and paste under --all-- in the fourth panel. Remember, right click - Accept after each step. You can rename the second entry in the fourth panel to its value for category SimpleDemoMorph. In the descriptionForPartsBin of the class MyScape1Master, change self partName:'NewScapes (Master)'.

Make some changes (like a new texture for floor tiling) as in the example above. Check if it works. If it works and you see the changes that you have done, save and exit Croquet and restart. Now you see a NewScapes (Master) in the green window.

Now launch NewScapes (Master), change avatar to Alice, and launch Simple Demo (Master) leaving the avatar Bunny. Connect Alice's world to Bunny's world.

Open Croquet

As Alice, step in Bunny's world.

Open Croquet

Open Croquet

From Bunny's world, connect to Alice's world.

Open Croquet

Now you can step back into your original world.


So now I have my world to practice in, and I am trying to build something by adding blocks. In the picture below I added two blocks as floor and wall of a building.

Open Croquet

These blocks are done by using the primitive TCube - of course the best way to build a complex geometry is by exporting from 3dsmax or Blender. I have not yet found out how to make the blocks solid (now I can go through them).

Personal tools