Easy Map Making
toolbar-separator.png This article is currently in development. You can help TI-Basic Developer by expanding it. This article seems to lack info. Needs attending.

Map making is a key part of making many types of games.

Pxl-test(

pxl-Test( is what the whole programs runs off.
The command pxl-Test( returns either 1 or 0, indicating whether a pixel is activated or not.

Code

Type in this code into your calculator:

ClrDraw
RecallPic 1
55→X
60→Y
Repeat A=45
Pxl-On(Y,X
Repeat Ans
getKey→A
End
Pxl-Off(Y,X
X-(Ans=24 and not(pxlTest(Y,X-1))+(Ans=26 and not(pxl-Test(Y,X+1→X
Y-(A=25 and not(pxlTest(Y-1,X))+(A=34 and not(pxl-Test(Y+1,X→Y
End

Instructions

Make any random map that pleases you and press [2ND] + [DRAW] + [LEFT] + [ENTER] + [1] + [ENTER] (Storepic 1). This will override Pic1 with whatever map you created.

Things to make sure of

1) Make sure that the pixel at (55,2) is not activated (black)
2) Make sure that your window settings are as follows: Xmin=0, Xmax=94, Ymin=0, Ymax=62. This makes sure that the resolution on the screen fits the pt-On( command (this makes life easier)

.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License