Ask coding questions

← Back to all posts
I did this and it bounces off in the middle of the screen with x pos in pygame
RickAstleyPlayz (1)
ball.y += ball_speed_y
ball.x += ball_speed_x

if ball.left <= 0 or ball.right >= screen_height:
    ball_speed_x *= -1
if <= 0 or ball.bottom >= screen_height:
    ball_speed_y *= -1
Wumi4 (486)

Ummm... Is this share or something? You don't give me your question, so I can't understand what's your problem.