Making a pong clone need assistance!!
Greetings...
I am trying to make a pong clone. I am having trouble getting the ball to move again after it resets itself.
As of right now there is collision off of the top and bottom of the screen making the ball bounce back. When the ball hits the left or right of the screen it resets itself back into the center. After that it no longer moves...
Any assistance would be greatly appricated.
Thanks!!
when you reset the ball to the center position also reset the velocity. Also reset the fact that there has been a collsion. Do you have two different sets of variables for the position, one for the graphics and one for the ball positio, make sure to reset both.
If this doesn't help then post the code.
If this doesn't help then post the code.
reseting after goal? if i am not wrong just make a speed value speed_max and after reseting position find random X and Y speeds, then start moving it. you can use a indicator like movement to stop the ball. hope helps..
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement