Summary: TurtleMorph - provides a turtle programmable in Smalltalk
Author: Robert Hawley
Owner: Robert Hawley (RJH)
Co-maintainers: <None>
PackageInfo name: TurtleMorph
RSS feed:


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 to be done on this - including making the turtle look better and be able to shuffle along visibly.