Ok, when I run this (its a pong program if you couldnt figure that out) the "ball" stays in the middle of the screen. I have it turn the pixel on at Z,X and it adds 2 or subtracts 2 to X to move it from one side to the other. it still lets me move my paddle around, so it is going through the program. Im thinking the ball is bouncing back and fourth between two spots, but I don't see how it would happen. Thanks for checking it out! (P.S, this is not done yet, and any advice is helpful
Lbl 1
ClrHome
32→A
32→B
0→S
48→X
32→Z
0→N
2→M
Disp "Welcome to PONG","1: No Friends","2: Two Player"
Repeat sum(J={92,93,45
getKey→J
End
If J=45
Stop
DispGraph
AxesOff
FnOff
While 1
X+M→X
Z+N→Z
Pxl-On(Z,X
getKey→K
If K
Then
If K=21
Then
If A≠6
Then
A-1→A
Pxl-Off(A+6,3
Pxl-On(A-5,3
Pxl-On(A+4,3
End
End
If K=31
Then
If A≠56
Then
A+1→A
Pxl-On(A-4,3
Pxl-On(A+5,3
Pxl-Off(A-6,3
End
End
If J=93
Then
If K=25
Then
If B≠6
Then
B-1→B
Pxl-Off(B+6,90
Pxl-On(B+4,90
Pxl-On(B-5,90
End
End
If K=34
Then
If B≠56
Then
B+1→B
Pxl-On(B-4,90
Pxl-On(B+5,90
Pxl-Off(B-6,90
End
End
End
End
If Z>58 or Z<5
N→N
If sum(X={3,4
Then
If sum(Z={A-1,A-2,A-3,A-4,A-5,A+1,A+2,A+3,A+4,A+5
Then
M→M
A-Z→N
S+1→S
ClrHome
End
If Z=A
randInt(-5,5)→N
End
If J=93
Then
If sum(X={89,90
Then
If sum(Z={B+1,B+2,B+3,B+4,B+5,B-1,B-2,B-3,B-4,B-5
Then
B-Z→N
M→M
ClrHome
End
If Z=B
randInt(-5,5)→N
End
End
If J=93 and sum(X={3,4}) and not(sum(Z={A,A-1,A-2,A-3,A-4,A-5,A+1,A+2,A+3,A+4,A+5
Goto L
If J=93 and sum(X={90,89}) and not(sum(Z={B,B+1,B+2,B+3,B+4,B+5,B-1,B-2,B-3,B-4,B-5
Goto L
If J=92 and sum({X=90,89
M→M
Goto A
If J=92 and sum(X={3,4}) and not(sum(Z={A,A-1,A-2,A-3,A-4,A-5,A+1,A+2,A+3,A+4,A+5
Disp "YOU SUCK!","1: Play Again?","2: Quit
Lbl L
If J=93 and sum(X={3,4
Disp "RIGHT WINS!","1: Play Again?","2: Quit
If J=93 and sum(x={89,90
Disp "LEFT WINS!","1: Play Again?","2: Quit
Repeat sum(L={92,93,45
getKey→L
End
If L=92
Return
If sum(L={93,45
Stop
Lbl A
If J=92
Text(1,48,S
End
Goto 1