Basic-Python-Programs icon indicating copy to clipboard operation
Basic-Python-Programs copied to clipboard

Pong_Game.py

Open Jnmarti88 opened this issue 2 years ago • 3 comments

Issue: line 95, in ball_dx = ball_dx * -1 NameError: name 'ball_dx' is not defined

game crashes moments after starting. Paddle appears on left hand side but there is no paddle on the right hand side of the game

Jnmarti88 avatar Jan 11 '23 06:01 Jnmarti88

hi, can i work on this issue

loki4514 avatar Mar 07 '23 08:03 loki4514

The error you are facing in the Pong game is because the ball_dx variable is not being found. Instead, there is a variable called ballxdirection. To fix the error you will need to replace all instances of ball_dx with ballxdirection.

the peddle appears on the opposite side because the number has to be negative to be on the right.

However, keep in mind that this correction may lead to another error in the score part. This is because the game still needs other fixes, like the logic of how the ball will hit the walls and also the logic to not let the paddles leave the screen.

You can make the changes yourself to fix it or if you want I can clone the project create a new branch and ask for a PR or I can make the corrections directly in the project, you know, I'm looking for my first issue on github.

Al3x1sCS avatar Apr 27 '23 19:04 Al3x1sCS

hi, can i work on this issue?I'm looking for my first issue on github.

MercuryDemo avatar Jan 04 '24 09:01 MercuryDemo