

I think that 1 is far too large of a number and you won't be able to get more than 5 hits in (if you're lucky). If (ball.xcor() -350) and (ball.ycor() paddle_a.ycor() -40):Īgain this could be improved by making a variable speed_up_by = 1 and then using ball.dx += speed_up_by to easily adjust it. Pen.write("Player A: ".format(score_a, score_b), align="center", font=("Courier", 24, "normal")) Pen.write("Player A: 0 Player B: 0", align="center", font=("Courier", 24, "normal")) Paddle_b.shapesize(stretch_wid=5, stretch_len=1) Paddle_a.shapesize(stretch_wid=5, stretch_len=1) When it goes down, it comes back to normal speed and of course the speed is looped and even if scored, it still speeds up. It speeds up tho, but only when ball goes up.

I know that I put ball.dx +=1 in wrong place. I wrote my first simple game which is ping-pong (based on yt tutorials) and I want to improve it a bit by speeding up the ball after each paddle hit and comes back to normal speed when scored.

I've been learning programming since 5 months and as the main language I've decided to stick to python.
