# Why is my TI-84+ program running so slow?

I've programmed a simple pong program into my TI-84+. However, after the "ball" moves about 30 times, the program starts slowing, eventually to a point at which the game is close to unplayable. Can anyone offer a suggestion as to why this may be happening?

Update:

AxesOff

ClrDraw

0- Xmin

95- Xmax

0- Ymin

63- Ymax

1- Xscl

1- Yscl

1- D #Direction

47- X #Ball Coords

26- Z #Ball Coords

0- F #User score

0- G #Comp score

Lbl M #Main

Text(5,5,F) #Score

Text(5,12,G) #Score

Pt-On(X,Z,2) #Ball

getKey- K #Key pressed

If K=25 #If up arrow pressed

Then

Pt-Off(2,U+3,2)

Else

If K=34

Then

Pt-Off(2,U,2)

Pt-Off(2,U+3,2)

U-5- U

End

End

Pt-Off(93,C+3,2)

If Z C+3 #adjust according to ball location

Then

C+2- C

Else

if Z C

End

End

If D=1 #directions

Then

Goto D1

Else

If D=2

Then

Goto D2

Else

If D=3

Then

Goto D3

Else

Goto D4

End

End

End

Lbl D1

Pt-Off(X,Z,3) #remove ball

X+2- X #change ball coords

Z+2- Z

If Z =61 #change direction if ceiling or floor hit

Then

2- D

End

If X =90

Then

Goto CC #check to see if ball hit paddle or i

Update 2:

Okay, the greater than or less than signs won't go through. If you see something like Z+2- Z, there should be an arrow there (it's assignment in ti-basic)

Update 3:

About the Z C thing, there should be a less than or greater than sign there.

Relevance
• Anonymous
9 years ago

That could be a memory leak. I've done a lot of programming with the TI-83+, and I think it has similar problems to the 84. As a program goes on, any variables you've saved somehow remain in memory even when they're overwritten by other ones. The garbage dump command fixes this, but it's annoying to do mid-game.

Edit: I guess the language for TI-84+ and TI-83+ are pretty different, but I think you are having the same problem that occurs on the 83. There's not much you can do about it as far as I'm aware. Maybe try rewriting your program in full TI-BASIC and install it as an app rather than a program. The full TI-BASIC has many more features than what is programmable from the TI's own interface.

Lv 4
4 years ago

I took 2 years of calculus in severe college (AB and BC) and AP information, and that i only used a TI-80 3 plus, and to be fairly elementary that is all you bypass with for, notably if you're sturdy at math and do not opt for on your calculator to do each ingredient for you. That having been reported, with the options you've given, bypass with the TI-80 4 to confirm that you to computer screen it to any attempt that you're taking, no journey identifying to purchase an 89 then desiring yet another calculator for SAT/ACT/competitions.

• 9 years ago

EDIT: Eek! Those else ifs are not necessito!

Not sure if the If Z C is good either. I think it's checking if Z is 1 or greater (meaning true), then do C, which would be silly because that's like saying.

If A=1

Then

2

End

• Anonymous
9 years ago

cuz u need a new card every now and then that is wut hapenz