I'm still working on these Nerdy Nights tutorials and I'm almost done : ) I'm having some trouble though working out a feature. Any help would be appreciated. I'm trying to add a timer to the release of the ball. For example, currently when the play screen is loaded the ball immediately begins moving towards a paddle. I instead would like the play screen to load, and the ball NOT appear for a few seconds to allow the players to ready themselves. To achieve this, I came up with a timer that I insert before the ball sprite initialization code. I have separated the code into sections to make this easier to read. Here is the timer. The amount of time the timer waits is controlled by the Constant SETREADYFRAMES
CMP #SETREADYFRAMES ;;Currently Set to 200
I then try to combine the timer with the subroutine LoadInitialBallstats. This subroutine stores the initial stats that the program needs to update the sprite positions in order to move the ball on screen.
;Timer Done. Now Set The Initial Ball Stats and Starting Paddle Position
Unfortunately, my timer just isn't doing what I want it to do. When I test the timer in the FCEUX debugger it is counting up the way I want it too, so in theory I think it should work, but in practice it isn't. When I set the timer to a lower framecount using SETREADYFRAMES, like below 200, the ball immediately moves on the screen without the delay I want. When I set the timer at 200 or above, the ball will not appear at all.
Any help with this problem would be very much appreciated : )