for the experiment, I decided to program a small game in my TI-89 using the built-in program editor, but I can’t find the best way to get keystrokes without significant delay. I currently have:
Prgm 70→xpos 70→ypos Loop If getKey()=340 Then xpos+3→xpos PxlCrcl ypos,xpos,5,1 EndIf If getKey()=337 Then xpos-3→xpos PxlCrcl ypos,xpos,5,1 EndIf If getKey()=257 Then Goto end EndIf EndLoop Lbl end EndPrgm
This creates an endless game loop that checks whether the left, right, or delete buttons are pressed, and draw a circle left or right, respectively, or complete the program. However, this method works very slowly, and I saw much smoother movement in other demos. Something is wrong with my method, and if so, how can I improve it?
source share