Jump to content
  • Advertisement
Sign in to follow this  
Vostromus

Making a pong clone need assistance!!

This topic is 4994 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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!!

Share this post


Link to post
Share on other sites
Advertisement
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.

Share this post


Link to post
Share on other sites
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..

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!