I'm really sorry that I'm raping this thread with questions, but I want to finish this pong clone
so I can go on and start coding for real.
The problem I'm having is with the paddle collisions. Here is my code for it.
Player1Collisions:
LDA player1
CMP ballPos+1
BNE .return
LDA player1+3
CMP ballPos
BNE .return
LDA #$01
STA ballDirection+1
STA ballDirection+2
LDA #$00
STA ballDirection
LDA ballDirection+3
.return:
RTS
And this subroutine is called in the main loop at the end, after the input is handled
and the sprites are updated. Everything I have done so far seems to work fine EXCEPT the paddle collisions.
Here is all the code, if it make things easier.
http://pastebin.com/eTVKQgGx...
ballPos is x, ballPos+1 is y, player1 is y and player1+3 is x.