(1) Make a program to show turtle.
' Show Turtle to Capture
Turtle
.
Show
(
)
tx
=
X
ty
Y
s
18
' set frame size
x1
-
/
2
x2
+
y1
y2
GraphicsWindow
BrushColor
"Gray"
PenWidth
0
FillRectangle
,
1
' draw frame
' draw center
(2) Capture original turtle using [Alt]+[Print Screen] key. Or you can use Snipping Tool also.
(3) Create a bitmap of original turtle using Paint program.
(4) Make a program to change turtle color. --> I made a tool (SDH367) for this.
(5) Capture new turtle using [Alt]+[Print Screen] key. Or you can use Snipping Tool also.
(6) Create a bitmap of another color turtle using Paint and GIMP2.
(7) Use the bitmap as image shape. --> I made a sample program (CQV406-0).
I decided to use arrow keys to control turtle. Arrow keys are recognized by using GraphicsWindow.KeyDown = OnKeyDown. (OnKeyDown is a key event handling subroutine.)
Score will be saved in setting file. Setting file name can be get with File.GetSettingsFilePath(). But file operation cannot be run in remote, so this is limitation for remote environment.
Ed Price - MSFT edited Revision 18. Comment: Tag
Nonki Takahashi edited Revision 17. Comment: re-uploaded image
Nonki Takahashi edited Revision 13. Comment: typo etc.
Nonki Takahashi edited Revision 12. Comment: corrected typo and removed null link
Nonki Takahashi edited Revision 11. Comment: case changed as another turtle and Small Basic Turtle
Nonki Takahashi edited Revision 10. Comment: case changed
Nonki Takahashi edited Revision 9. Comment: typo
This article is from social.msdn.microsoft.com/.../9d2632ad-6653-4fcd-a7e6-4f085c7f1dc9 .
Nonki Takahashi edited Revision 7. Comment: created
Nonki Takahashi edited Revision 8. Comment: added about Wall Follower algorithm and minor change
Really cool article - the turtle disappearing after a Clear is a long term known bug. It can be got round with LitDev extension, LDShapes.ResetTurtle() until it is fixed with a new version of SB.
Nonki, I featured this winning article on the Small Basic blog: blogs.msdn.com/.../small-basic-guru-how-to-make-a-turtle-maze-game.aspx
Thanks!
And featured on this blog: blogs.msdn.com/.../small-basic-guru-nonki-takahashi-s-quot-how-to-make-a-turtle-maze-game-quot-on-technet-wiki.aspx
And yesterday it was featured on the Wiki Ninjas blog: blogs.technet.com/.../june-small-basic-guru-nonki-takahashi-brings-us-quot-how-to-make-a-turtle-maze-game-quot.aspx
Finally, it was featured on the home page of TechNet Wiki today: social.technet.microsoft.com/wiki
Great job!