Croquet 2 Play

A Fun Key 2 The Future

Getting Started With Croquet

Matthew Schmidt has provided a nice intro to launching a Croquet world programmatically. If you found it helpful you may want to view(or review) these pages from the Croquet Consortium site while waiting for his next installment:

If you’re itching for more right now, you might try to understand what the quick and dirty path has in common with the route taken by Simple World. To do that you need to find out where and how the SimpleWorld class is used. One approach would be to open a class browser and choose Class Refs from the menu:

classesreferringtosimpleworld.png

However, this will take you on a somewhat thorny path

thethornypathtosimpleworld.png

that ends at a fork where you have to decide what classes to explore further but haven’t really learned anything to base that choice on. Often in Squeak, whenever there’s interaction with the UI, the most direct path to understanding starts with the morph you are clicking. You can cmd-click(Mac) or right-click (Windows) on any morph to bring up a set of icons called a halo.

objecttoolhalo.png

Repeated clicks will drill down to the object you are mousing over.

buttonhalo.png

Once you have a halo for the object of interest, use the red icon to bring up a menu and open an Object Explorer

gettinganexplorer.png

 

exploringamorph.png

Even without knowing anything about the protocol, you can figure out that when you drag one of these buttons out, it sends a message to CroquetMaster. Browsing that class you can see it’s purpose in life seems to be to create a Croquet Harness which is where SimpleWorlds get created

creatingasimpleworld.png

Careful observers will notice the class CroquetParticipant which is probably somehow related to KCroquetParticipant so try using the class menu

theclassmenu.png

to open a Hieararchy browser and see

browsingthecroquetparticipanthierarchy.png

Once you start exploring KCroquetParticipant, you’ll see that it provides a framework to do what hard-coded methods in SimpleWorld and CroquetMaster accomplish. Hopefully it won’t be long before Matthew covers this better and expands on it but for those chomping at the bit, there’s something to chew on. You may also find the context provided by the Subsystem Overview useful.

2 Comments so far

  1. Matthew Schmidt October 13th, 2007 4:07 pm

    Cheers to this!

    Great write up… I will be following up on it soon.

    For now, here’s the next installment in the quick and dirty series:

    http://xaverse.blogspot.com/2007/10/quick-and-dirty-guide-part-ii.html

    Coming next will be assigning a script to a button.

    -Matt

  2. Club Squeak » Use The Object Explorer Luke* October 17th, 2007 1:40 am

    […] In any Squeak  environment, the Object Explorer can help you learn how things work. The following link has a step-by-step, illustrated example: Often in Squeak, whenever there’s interaction with the UI, the most direct path to understanding starts with the morph you are clicking. You can cmd-click(Mac) or right-click (Windows) on any morph to bring up a set of icons called a halo. Getting Started With Croquet  […]

Leave a reply

You must be logged in to post a comment.