This is a fun game that has been tested on multiple TI-83+'s and should work on the TI-84+. I made this game for CalcNerd's Youtube channel if he wants it, but anyone can type it in if they want. It generates a maze and then you have to navigate to the finish. It uses the sidewinder algorithm for maze generation. It's a great time killer as well. Please let me know if you find bugs in the code.
Instructions: You start as a pixel in the top-left corner, and you must use the arrow keys to navigate to the bottom-right corner of the maze. If you run into a wall you die. If you die, you can load the last maze that was generated by pressing "LOAD" in the main menu of the game. Press [CLEAR] while playing to go back to the main menu. Make sure to always press "NEW" in the game's main menu when you first play.
*Note* — The sidewinder algorithm for maze generation works well, but it has some biases. So, while each
maze will be unique, many of them will be similar in overall structure. To experiment with different
configurations, edit the specified number that I have marked with a comment in the code (there are
only a couple comments in the code, so you can probably find it :D).
Here's the code (// indicates a comment and the indentation is just to make it look cleaner):
PROGRAM: MAZE
Lbl 3
ClrDraw
AxesOff
FnOff
PlotsOff
0->Xmin
94->Xmax
-62->Ymin
0->Ymax
Menu("_MAZE_-_BY_JOE__" //Underscores are spaces
,"NEW",0
,"LOAD",1
,"QUIT",2
Lbl 0
Text(-1,1,65,"MAZE
Line(61,-9,92,-9
For(X,1,61,2
Line(X,-1,X,-61
Line(1,-X,61,-X
End
Line(2,-2,60,-2,0
Pt-Off(61,-60
For(Y,2,30
1->R
For(X,1,30
If X≠30 and randInt(0,1 // This is the line that I talked about in the *Note*. Right now, it's configured
// so that 50% of the passages are carved horizontally and 50% are carved
// vertically. To increase the number of horizontal passages carved, increase
// the second argument (1) of randInt(). To increase the number of vertical passages
// carved, change the randInt(0,1 to not(randInt(0,1 and increase the value of the
// second argument (1) of randInt().
Then
Pxl-Off(2Y,2X+1
Else
Pxl-Off(2Y-1,2randInt(R,X
X+1->R
End
End
End
StorePic 0
Lbl 1
RecallPic 0
2->X:2->Y:E3->S // "E" being the character found by pressing [2nd] and then the comma button
Repeat K=45 or X=61 or pxl-Test(Y,X
Pxl-On(Y,X
Repeat Ans
getkey->K
End
Pxl-Off(Y,X
S-1->S
X+(K=26)-(K=24->X
Y+(K=34)-(K=25->Y
End
Text(15,65,"YOU"+sub("LOSEWIN!",1+4(X=61),4
Text(27,65,"SCORE:
Text(-1,34,66,S(X=61
Pause
ClrDraw
ZStandard
AxesOn
ClrHome
Goto 3
Lbl 2
Disp "83-2(20/4) // You don't need this, it just makes it look like you're
73 // doing math if a teacher walks by and you just quit the game. :D