TurtleMorph

Release name: TurtleMorph
Release summary: TurtleMorph conveniently callable within Smalltalk code (independent of eToys)
Automatic version: 2
Manual version: (1)
Published by: <Not published yet>
Created: 12 March 2010 1:41:38 am
Last updated: 12 March 2010 1:41:38 am
Categories:
Release note:

With TurtleMorph you can add methods to the class TurtleMorph and so simply programme new turtle actions. The normal kind of behaviour that occurs with scripting now happens with methods. This means that initial teaching of Smalltalk can be done using a typical turtle of the kind met in LOGO programming.

[Morphic is usually driven by scripts, but when you try to programme methods you have to take account of the fiddles that the programmers did to keep morphs efficient. Morphs divide into two parts, costume and player. For efficiency morphs only get given the player only when needed- so for example with the forward: message, this is implemented in the player class and not in the morph class, so the morph has to create a player in order to deal with the forward: message. This happens automatically when using the etoys system, but not if you write scripts in methods. TurtleMorph traps any messages that should go to the player and makes sure the necessary player exists before passing the message on. Without this feature, you would have to know where you were directing the message and use 'assuredPlayer' to make sure the player exists. TurtleMorph by-passes this, so you can write forward: and send it straight to the TurtleMorph WITHOUT having to know that actually the implementation passes it to a player that may or may not exist!]

There is more work could be done on this - including making the turtle look better and be able to shuffle along visibly.


Release homepage:
Download: http://map.squeak.org/accountbyid/94efac2d-50af-4408-a3d1-a4442eaefe28/files/TurtleMorph.st
SHA checksum: nil

Back