Advertisement Jump to content
Sign in to follow this  

Need fix for Table Tennis game

This topic is 1016 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

The freeware table tennis game is coded in C++ using OpenGL and SDL.

The game source, installer, and a video showing the problem are attached.


When the human controlled player at the bottom of the screen swings the paddle quickly right or left just prior to and while making contact with the ball, the ball has more side spin and curve which often results in the computer controlled paddle at the top of the screen hitting the ball backwards since the computer paddle's position remains aimed sideways rather than changing the paddle position toward the human controlled player.  The problem should be in the Bat.cpp method BatControllerAI::FindWhereToHitBack().
The human controlled paddle at the bottom of the screen is controlled with the mouse.  Pressing the right mouse button enables the paddle to swing from the right side.  Press the left mouse button enables the paddle to swing from the left side.  
If you can upload a version with the fix I'd greatly appreciate it.  Thanks in advance.

Share this post

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

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!