Here is a small turtle graphics game I made for my kids.
Move the turtle by writing instructions into its DNA.
- F: move the turtle forward
- L: rotate the turtle 45° left (counter-clockwise)
- R: rotate the turtle 45° right (clockwise)
- B: make a baby turtle
- P: poop
- C: clean up the poop
The turtle dies at the end of the DNA. Baby turtles start over at the beginning of the DNA.
Here are some examples:
- PFRBPPLFPFPPPCFPPCFPC
- FFFLFFFBPFFFBCFFBFBFPPC
- FPFPLFPFPBRRRRFFLLFPFPBC
- FFFFFFFFFFPPFFFFFFFFRBFBLC
- BFRRRBRRRBLFFFFPPFFFFPPPPCCCPFRB
- CLCLLRPRPFBFBLCLCRPRPFBFBRPLFBCPRLFBC
- PFPFPRPFPFPPFPPPFFFFFCFFFLFFFFFFFBFBRB
- PFRBLFFFFFFFFFFFFPLLLLFFFFFFFFFFFFLCFPB
- FPFPFPFPRRBLLBLLFPPCFFFFFFFFPCFRPPBFBFBFBFBFRPC
- PFPPPRPRBLLPFPFPFFPFPFFFPFPPFPRRBFCCFFFFFFFCCLLB
- RPBFPRFPFFFFFFFFPFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFPBC
- CFFFFFFFFFFFFFFPFPFPRRFPRRFPFPFFFFFFFFPFPFPLLFPLLFPFPBLLB
- PFPRBLLLCLLLFFBFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC
- PFPPFPPPRRFPPPPFPPPPPFFFFFFFFFFFFFFFFFFFFFFFCFCFBFFFFFFFFFFFFFFFFFFFFFFCFFB
- FPPFPFPRRFPFPFPFPLLFPFPFPFPCLLFPFPCCCPFPFPFPRRBLCLLLBRPPPFPPFPPFPPFPPPFPPPFPPPFPPPFPPPFPFFPFCCCRCCCFFPFPFPPFPFPFPFPRRBCC
- FCPPPFPPPCBRRRFFFPFPFPFPFPFPFPFFPRBCRRFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFRPFFFFFFFFFFFFBC
For more examples, or to share your own creations, please see discussions.
This was inspired by Isabel Beach's L-systems and Turtle Graphics and Susam Pal's CFRS[].
Thanks to:
- Matilda for the Clean instruction
- Vaelatern for the loop option
Michael Erickson