Tutorials

From Croquet Consortium

Jump to: navigation, search

Contents

Video Tutorials

  • Quicktime tutorial on getting started with the demos (Part 1 and Part 2).
  • Quicktime tutorial on getting started with programming with Croquet.
  • Quicktime example of some recent work with avatars being done at The University of Minnesota
  • Quicktime lesson on how to update your Croquet image
  • Quicktime lesson on how to locate and use legacy content
  • Quicktime lesson on how to import from and export to Poser from Croquet
  • Another Quicktime lesson on working with avatars
  • An explanation of how to get robots such as recordable avatars, zombies, and other NPCs (Non-Player Characters) into Croquet.

Old Tutorials

Here are two tutorials

Important: They are updated for Croquet 1.0 Beta:

And an old Squeak tutorial:

A new version of these tutorials are here

Special Subjects

Books

  • OpenGL Programming Guide, Third Edition. OpenGL Architecture Review Board, Mason Woo, Jackie Neider, Tom Davis, Dave Shreiner, Addison-Wesley. 1999.
  • OpenGL Game Programming. Kevin Hawkins, Dave Astle. Prima Publishing. 2001.
  • Squeak: Open Personal Computing and Multimedia ed. Mark Guzdial and Kim Rose. Prentice Hall, 2002
  • Squeak: Object-Oriented Design with Multimedia Applications. Mark Guzdial. Prentice Hall, 2000.
  • Squeak: A Quick Trip to ObjectLand by Gene Korienek, Tom Wrensch, and Doug Dechow, Addison-Wesley Professional.
  • Robot Manipulators: Mathematics, Programming, and Control. Richard P. Paul. Massachusetts Institute of Technology. 1981.

Learning Squeak

Matthew Fulmer has been hard at work putting together an annotated list of Squeak tutorials. See http://wiki.squeak.org/squeak/792

Why?

Croquet piggy-backs on top of Squeak (http://squeak.org):

  • partly because we need a bit identical cross-platform environment. See The Core Model
  • partly because Squeak is a damn good self-documenting dynamic language programming environment.
  • partly because it's got a heck of a lot of good libraries built in, with a great community making more.

Croquet itself is distributed as a Software Developer's Kit: to do anything, you need to do some programming using the examples given. This programming is done in Squeak. Croquet doesn't provide tutorials on the Squeak platform or Smalltalk language, but the very active Squeak/Smalltalk community does.

What you should expect to learn

If you're new to Squeak, there are some basic things that you need to learn from these tutorials:

  1. Squeak stores everything not in individual source files, but in an "image" that consists of two files (with extensions .image and .changes).
  2. You run squeak by executing an .image on an operating-system-specific virtual machine executable. E.g, double click the VM and specify image name, or drag .image file onto VM file.
  3. The "source" for what you actually need to work with is in the image, as described below.Don't even think of "recompiling from source." That's almost certainly not going to help a non-expert Squeaker or be meaningful.
  4. Red/yellow/blue button terminology to work around the fact that mac/old-Windows/new-Windows/Unix all have different mouse button arrangements.
  5. At the top of most scroll bars is a tiny little square box with a little square in it. Click on that to get a menu of stuff peculiar to what's being shown in that scroll bar. Note that a lot of stuff in menus has a hot-key accelerator. After I while, you will most often end up using the hot-keys.
  6. World menu: click on the desktop.
    1. World->save as new version (makes a copy of the image, with everything you've changed)
    2. World->save and quit
    3. and more as follows...

Class (aka System) Browser: World -> open -> class browser

  • System browser has (on top from left to right): Packages (groups of classes), Classes, Categories (groups of methods), Methods
  • E.g., Select a Package, then a Class within that package, then a category (or --all--), then a method. Method source appears at botttom.
  • But Package is not alphabetical, and the names don't mean anything to you yet, so....
  • The menu at the top of the Category pane has Find Class. E.g., enter any part of TFrame.
  • There are instance methods and class methods, where the latter act kind of like instance methods on the class metaobject. Click the 'instance' or 'class' button under the Class pane to see only instance methods or only class methods listed on the right. E.g., suppose Foo is a class:
       aFoo := Foo new.   aFoo someInstanceMethod.   Foo someClassMethod.   aFoo class someClassMethod. 
  • After editing, to 'accept' a method definition (saves in image and compiles), use that little square menu button on the top of the method source scroll bar.

Workspace: World -> open -> workspace

  • You can do the following in method source editors, too, but beginners tend to want to keep those "clean" and do their scratch work in a workspace.
  • highlight code and use the little square menu on the scroll bar to:
    • print it - evaluates the code and prints the result.
    • do it - just evaluate it for side-effect
    • more...
      • browse it, senders of it, implementors of it, references to it, These are VERY powerfull tool to use in learning Croquet.
      • selectors containing it, method strings with it, methods source with it, These are a VERY powerfull tool to use in learning Croquet.
      • etc. By the way, a method that takes multiple arguments has a method selector with several parts, separated by a colon.
    e.g., an example in source might be someInstance foo: fooArg bar: 3 baz: "some string". The selector is foo:bar:baz:
    We tend to write #someMethod:withArg: in correspondence to make the method selector stand out, or
    SomeClassName>>someMethod:withArg: to indicate we mean an instance method of a particular class.
Views
Personal tools