Hey, so this is my first game that I have ever made. It's a simple game in TI-Basic. I programed most of it on my calculator actually. Basically, a key is displayed on the screen and you have a small amount of time to press that key before the time expires. It currently has three modes, and 3 high scores are displayed along with a 5 character name for each of the 9 total high scores.
I am pretty much finished with the game except for a few bugs, and I also plan to make a TI-83/84+ version (smaller window). I'll go ahead and explain the current bugs that I don't really know how to fix and could use some help.
1. You must already have LQ={0,1,1,1,1,1,1,1,1,1} before the program can even run. I don't know how I can create a list once and not have that list be reset every time the program is run (It might make more since looking at the source code).
2. If all the high scores for the Master mode are the same, and you achieve a high score, it will become the second best high score not the first high score. I've looked through the code and I seen differences to the code for the other modes (I programed them the same), yet they work.
3. The game simply put lags. After your score reaches 10, you can noticeably see the game begin to slow down. Also, if you play a new game without restarting the program, you see this problem arise too. I tried to compensate for this by reducing the amount of time that you have to press the button, but that doesn't work that well. I have tried to optimize the code as best as I can and I don't understand why it lags.
4. There aren't any other bugs, just minor things like tweaking the times etc.
Code:
I guess i'll put a few screeshots here until I make a video (I'll probably make a video if I can get these issues fixed).
Any suggestions or constructive criticism is highly appreciated (and help with the bugs )
I am pretty much finished with the game except for a few bugs, and I also plan to make a TI-83/84+ version (smaller window). I'll go ahead and explain the current bugs that I don't really know how to fix and could use some help.
1. You must already have LQ={0,1,1,1,1,1,1,1,1,1} before the program can even run. I don't know how I can create a list once and not have that list be reset every time the program is run (It might make more since looking at the source code).
2. If all the high scores for the Master mode are the same, and you achieve a high score, it will become the second best high score not the first high score. I've looked through the code and I seen differences to the code for the other modes (I programed them the same), yet they work.
3. The game simply put lags. After your score reaches 10, you can noticeably see the game begin to slow down. Also, if you play a new game without restarting the program, you see this problem arise too. I tried to compensate for this by reducing the amount of time that you have to press the button, but that doesn't work that well. I have tried to optimize the code as best as I can and I don't understand why it lags.
4. There aren't any other bugs, just minor things like tweaking the times etc.
Code:
ClrHome
Lbl S
Output(3,9,"REACTION"):Output(4,7,"By Alpha527")
Output(9,3,"Press Enter to continue."):Pause :ClrHome
If ⌊Q(1)=0:Then:{1,1,1,1,1}→⌊QZ:{1,1,1,1,1}→⌊QY:{1,1,1,1,1}→⌊QX:{1,1,1,1,1}→⌊QW:{1,1,1,1,1}→⌊QV:{1,1,1,1,1}→⌊QU:{1,1,1,1,1}→⌊QT:{1,1,1,1,1}→⌊QR:{1,1,1,1,1}→⌊QS:1→⌊Q(1):End
Lbl 2
Menu("REACTION MENU","PLAY",20,"HIGHSCORES",25,"HOW TO PLAY",22,"CREDITS",23,"Quit",E)
Lbl E
Disp "REACTION: BY ALPHA257"
Stop
Lbl 25
Output(1,9,"HIGHSCORES!"):Output(2,1,"EASY AVERAGE")
Output(6,1,"MASTER")
Output(3,2,⌊Q(2)):Output(4,2,⌊Q(3)):Output(5,2,⌊Q(4)):Output(3,23,⌊Q(5)):Output(4,23,⌊Q(6)):Output(5,23,⌊Q(7))
Output(7,2,⌊Q(8)):Output(8,2,⌊Q(9)):Output(9,2,⌊Q(10))
"?
For(B,1,dim(⌊QZ
Ans+sub("1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ",⌊QZ(B),1
End
sub(Ans,2,length(Ans)-1→Str0
Output(3,5,Str0)
"?
For(B,1,dim(⌊QY
Ans+sub("1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ",⌊QY(B),1
End
sub(Ans,2,length(Ans)-1→Str0
Output(4,5,Str0)
"?
For(B,1,dim(⌊QX
Ans+sub("1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ",⌊QX(B),1
End
sub(Ans,2,length(Ans)-1→Str0
Output(5,5,Str0)
"?
For(B,1,dim(⌊QW
Ans+sub("1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ",⌊QW(B),1
End
sub(Ans,2,length(Ans)-1→Str0
Output(3,17,Str0)
"?
For(B,1,dim(⌊QV
Ans+sub("1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ",⌊QV(B),1
End
sub(Ans,2,length(Ans)-1→Str0
Output(4,17,Str0)
"?
For(B,1,dim(⌊QU
Ans+sub("1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ",⌊QU(B),1
End
sub(Ans,2,length(Ans)-1→Str0
Output(5,17,Str0)
"?
For(B,1,dim(⌊QT
Ans+sub("1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ",⌊QT(B),1
End
sub(Ans,2,length(Ans)-1→Str0
Output(7,5,Str0)
"?
For(B,1,dim(⌊QS
Ans+sub("1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ",⌊QS(B),1
End
sub(Ans,2,length(Ans)-1→Str0
Output(8,5,Str0)
"?
For(B,1,dim(⌊QR
Ans+sub("1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ",⌊QR(B),1
End
sub(Ans,2,length(Ans)-1→Str0
Output(9,5,Str0)
Pause :ClrHome:Goto 2
Lbl 22
Output(1,7,"HOW TO PLAY"):Output(3,2,"ONCE THE GAME STARTS,")
Output(4,1,"A KEY WILL APPEAR ON THE")
Output(5,1,"SCREEN. PRESS THAT KEY ANDYOU WILL GET A POINT.")
Output(8,2,"DO NOT DOUBLE PRESS A KEY BECAUSE YOU WILL LOSE."):Pause :ClrHome
Output(1,7,"HOW TO PLAY"):Output(3,2,"Time Limits:")
Output(4,1,"Score:"):Output(4,13,"0"):Output(4,15,"10"):Output(4,18,"20"):Output(4,21,"30"):Output(4,24,"40")
Output(6,1,"NOOB"):Output(7,1,"AVERAGE"):Output(8,1,"MASTER")
Output(5,1,"--------------------------"):Output(4,11,"I"):Output(5,11,"I"):Output(6,11,"I"):Output(7,11,"I"):Output(8,11,"I")
Output(6,12,"30"):Output(6,15,"26"):Output(6,18,"22"):Output(6,21,"18"):Output(6,24,"15")
Output(7,12,"24 20 16 12 9"):Output(8,12,"20 16 12 8 5")
Output(10,1,"By 50, ALL MODES TIME IS 5.")
Pause :ClrHome:Goto 2
Goto 2
Lbl 23
Output(1,8,"CREDITS!")
Output(3,2,"THIS GAME WAS CREATED BY")
Output(4,1,"ALPHA527. I CAME UP WITH THE IDEA AND NAME MYSELF."):Pause
ClrHome:Goto 2
Lbl 20
Menu("SELECT DIFFICULTY.","NOOB",27,"AVERAGE",28,"MASTER",29)
Lbl 27
30→D:1→θ:Output(2,24,⌊Q(2)):Goto 21
Lbl 28
24→D:2→θ:Output(2,24,⌊Q(5)):Goto 21
Lbl 29
20→D:3→θ:Output(2,24,⌊Q(8):Goto 21
Lbl 21
0→S
0→T
Output(1,9,"REACTION")
Output(2,1,"SCORE:0")
Output(3,22,"DIF:")
Output(3,26,θ)
Output(3,1,"TIME:")
Output(2,16,"H SCORE:")
Output(10,2,"PRESS ENTER TO START"):Pause :Output(10,2," ")
Lbl 2D
randInt(5,10,1)→⌊B
⌊B(1)→Y
randInt(1,23,1)→⌊B
⌊B(1)→Z
Lbl 2A
If θ=1:Then:6→Y:12→Z:End
If S=10:Then:D-4→D:End
If S=20:Then:D-4→D:End
If S=30:Then:D-4→D:End
If S=40:Then:D-3→D:End
If S=50:Then:5→D:End
randInt(1,29,1)→B
⌊B(1)→A
If A=1:Then:Output(Y,Z,"X"):Lbl 2B:End
If A=2:Then:Output(Y,Z,"sin("):Lbl 2B:End
If A=3:Then:Output(Y,Z,"cos("):Lbl 2B:End
If A=4:Then:Output(Y,Z,"tan("):Lbl 2B:End
If A=5:Then:Output(Y,Z,"^"):Lbl 2B:End
If A=6:Then:Output(Y,Z,"X²"):Lbl 2B:End
If A=7:Then:Output(Y,Z,","):Lbl 2B:End
If A=8:Then:Output(Y,Z,"("):Lbl 2B:End
If A=9:Then:Output(Y,Z,")"):Lbl 2B:End
If A=10:Then:Output(Y,Z,"/"):Lbl 2B:End
If A=11:Then:Output(Y,Z,"log("):Lbl 2B:End
If A=12:Then:Output(Y,Z,"7"):Lbl 2B:End
If A=13:Then:Output(Y,Z,"8"):Lbl 2B:End
If A=14:Then:Output(Y,Z,"9"):Lbl 2B:End
If A=15:Then:Output(Y,Z,"*"):Lbl 2B:End
If A=16:Then:Output(Y,Z,"ln("):Lbl 2B:End
If A=17:Then:Output(Y,Z,"4"):Lbl 2B:End
If A=18:Then:Output(Y,Z,"5"):Lbl 2B:End
If A=19:Then:Output(Y,Z,"6"):Lbl 2B:End
If A=20:Then:Output(Y,Z,"-"):Lbl 2B:End
If A=21:Then:Output(Y,Z,"sto"):Lbl 2B:End
If A=22:Then:Output(Y,Z,"1"):Lbl 2B:End
If A=23:Then:Output(Y,Z,"2"):Lbl 2B:End
If A=24:Then:Output(Y,Z,"3"):Lbl 2B:End
If A=25:Then:Output(Y,Z,"+"):Lbl 2B:End
If A=26:Then:Output(Y,Z,"0"):Lbl 2B:End
If A=27:Then:Output(Y,Z,"."):Lbl 2B:End
If A=28:Then:Output(Y,Z,"(-)"):Lbl 2B:End
If A=29:Then:Output(Y,Z,"Enter"):End
Lbl 2B
Repeat getKey
getKey→K
Output(3,6,T)
If T=1 and θ=3:Then:Output(5,1," ":End
If T=D:Then:Goto 2Q:End
If K=0:Then:T+1→T:Goto 2B:End
If K=51:Then:1→K:T+1→T:Goto 2I:End
If K=52:Then:2→K:T+1→T:Goto 2I:End
If K=53:Then:3→K:T+1→T:Goto 2I:End
If K=54:Then:4→K:T+1→T:Goto 2I:End
If K=55:Then:5→K:T+1→T:Goto 2I:End
If K=61:Then:6→K:T+1→T:Goto 2I:End
If K=62:Then:7→K:T+1→T:Goto 2I:End
If K=63:Then:8→K:T+1→T:Goto 2I:End
If K=64:Then:9→K:T+1→T:Goto 2I:End
If K=65:Then:10→K:T+1→T:Goto 2I:End
If K=71:Then:11→K:T+1→T:Goto 2I:End
If K=72:Then:12→K:T+1→T:Goto 2I:End
If K=73:Then:13→K:T+1→T:Goto 2I:End
If K=74:Then:14→K:T+1→T:Goto 2I:End
If K=75:Then:15→K:T+1→T:Goto 2I:End
If K=81:Then:16→K:T+1→T:Goto 2I:End
If K=82:Then:17→K:T+1→T:Goto 2I:End
If K=83:Then:18→K:T+1→T:Goto 2I:End
If K=84:Then:19→K:T+1→T:Goto 2I:End
If K=85:Then:20→K:T+1→T:Goto 2I:End
If K=91:Then:21→K:T+1→T:Goto 2I:End
If K=92:Then:22→K:T+1→T:Goto 2I:End
If K=93:Then:23→K:T+1→T:Goto 2I:End
If K=94:Then:24→K:T+1→T:Goto 2I:End
If K=95:Then:25→K:T+1→T:Goto 2I:End
If K=102:Then:26→K:T+1→T:Goto 2I:End
If K=103:Then:27→K:T+1→T:Goto 2I:End
If K=104:Then:28→K:T+1→T:Goto 2I:End
If K=105:Then:29→K:T+1→T:End
Lbl 2I
If K=A:Then:0→T:S+1→S:Output(4,1," "):Output(2,7,S)
Output(3,7," ")
If θ≠1:Then:Goto 2D:End
Goto 2A:End
If K≠A:Then:Goto 2Q:End
Goto 2B
Lbl 2Q
0→A
ClrHome
Output(1,10,"REACTION")
Output(3,8,"GAME OVER!")
Output(4,5,"FINAL SCORE:"):Output(4,17,S)
If θ=1:Then:If S>⌊Q(4):Then:Output(8,4,"YOU GOT A HIGHSCORE!"):S→⌊Q(4)
Output(9,1,"INPUT 5 LETTER NAME"):Input Str0
DelVar ⌊QQ
For(B,1,length(Str0
inString("1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ",sub(Str0,B,1→⌊QQ(B)
End
If ⌊Q(4)>⌊Q(3):Then:⌊Q(3)→A:⌊Q(4)→⌊Q(3):A→⌊Q(4):End
If ⌊Q(3)>⌊Q(2):Then:⌊Q(2)→A:⌊Q(3)→⌊Q(2):A→⌊Q(3):End:End
If ⌊Q(2)=S:Then:⌊QY→⌊QX:⌊QZ→⌊QY:⌊QQ→⌊QZ:Goto QL:End
If ⌊Q(3)=S:Then:⌊QZ→⌊QY:⌊QQ→⌊QY:Goto QL:End
If ⌊Q(4)=S:Then:⌊QQ→⌊QX:Goto QL:End:End
If θ=2:Then:If S>⌊Q(7):Then:Output(8,4,"YOU GOT A HIGHSCORE!"):Output(9,1,"INPUT NAME"):Input Str0
DelVar ⌊QQ
For(B,1,length(Str0
inString("1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ",sub(Str0,B,1→⌊QQ(B)
End:S→⌊Q(7)
If ⌊Q(7)>⌊Q(6):Then:⌊Q(6)→A:⌊Q(7)→⌊Q(6):A→⌊Q(7):End
If ⌊Q(6)>⌊Q(5):Then:⌊Q(5)→A:⌊Q(6)→⌊Q(5):A→⌊Q(6):End:End
If ⌊Q(5)=S:Then:⌊QV→⌊QU:⌊QW→⌊QV:⌊QQ→⌊QW:Goto QL:End
If ⌊Q(6)=S:Then:⌊QV→⌊QU:⌊QQ→⌊QV:Goto QL:End
If ⌊Q(7)=S:Then:⌊QQ→⌊QU:Goto QL:End:End
If θ=3:Then:If S>⌊Q(10):Then:Output(8,4,"YOU GOT A HIGHSCORE!"):Output(9,1,"INPUT NAME"):Input Str0
DelVar ⌊QQ
For(B,1,length(Str0
inString("1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ",sub(Str0,B,1→⌊QQ(B)
End:S→⌊Q(10)
If ⌊Q(10)>⌊Q(9):Then:⌊Q(9)→A:⌊Q(10)→⌊Q(9):A→⌊Q(10):End
If ⌊Q(9)>⌊Q(8):Then:⌊Q(8)→A:⌊Q(9)→⌊Q(8):A→⌊Q(8):End:End
If ⌊Q(8)=S:Then:⌊QS→⌊QR:⌊QT→⌊QS:⌊QQ→⌊QT:Goto QL:End
If ⌊Q(9)=S:Then:⌊QS→⌊QR:⌊QQ→⌊QS:Goto QL:End
If ⌊Q(10)=S:Then:⌊QQ→⌊QR:Goto QL:End:End
Pause
Lbl QL
ClrHome
Goto 2
I guess i'll put a few screeshots here until I make a video (I'll probably make a video if I can get these issues fixed).
Any suggestions or constructive criticism is highly appreciated (and help with the bugs )