Crawling Caterpillar
Eleven sprites form the segments of a crawling
caterpillar. Sprite1 contains a random turn routine and is the "head" of the caterpillar. The other ten segments "point toward" the segment (sprite#) that it trails. With the exception of the head, each sprite plays "follow the leader" with the sprite in front of it.
Stop the program and use the mouse to separate the segments. Run the prgram and watch the segements chase each other to reconnect.
To have the caterpillar leave a trail, do a pendown on sprite1.
The caterpillar crawls faster in full-screen.
Comments
You need to be logged in to post comments
Add a Comment
Loved it!