1

Bouncy ball (pygame)

view story
linux-howto

http://ubuntuforums.org – I am making a pong game and am putting it together a piece at a time. Right now I am working on a simple bouncy ball. I can make it move, but it wont bounce back. Basically I don't know how to set up walls . Here is my code: Code: #!/usr/bin/python import pygame import sys from pygame.locals import * x_vel = 1 y_vel = 1 x = 1 y = 1 pygame.init() screen = pygame.display.set_mode((600,600),0,32) screen.blit(screen, (0,0)) ball_img = pygame.image.load('ball.png') ball_cover = pygame.image.load('blank_ball.png') clock = pygame.time.Clock() ball_rect = ball_img.get_rect() while Tru (Hardware)