I am fairly new to programming with TI-Basic and having created a few fairly simple but inefficient programs I decided to create a simple reaction game that has players press the corresponding number keys from a visual prompt. I used simple graphics with a window setting of (0,0) to (4,4) for this program as one optimization (I was originally using 9 pictures and recalling them as needed), however I would like feedback from an experienced group on how to optimize my program. [At the start of the program there is a very crude timer to give the player a chance to prepare]
:6→W
:0→S
:0→X
:0→Y
:0→R
:ClrHome
:While W>0
:For(V,1,100)
:End
:ClrHome
:W-1→W
:Output(4,8,W)
:End
:ClrDraw
:DispGraph
:Lbl A
:0→H
:ClrDraw
:randInt(1,3)→X
:randInt(1,3)→Y
:101-10Y+X→R
:Horizontal Y
:Vertical X
:While H<50
:getKey→K
:If K=R:Then:S+1→S:Goto A:End
:If K=105:Stop
:H+1→H
:End
:ClrDraw
:Disp S
Any feedback would be great thanks :)