[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] screen.fill() not working



Ok, I was starting to write a game, so i wrote this code:

import sys, pygame
from pygame.locals import *
screen = pygame.display.set_mode((500, 200),0,32)
clock = pygame.time.Clock()
bgc = 150, 150, 80
redcar = pygame.image.load("redcar.png").convert_alpha()
while True: #main loop
    clock.tick(30)
    for event in pygame.event.get(): #every game has one
        if event.type == QUIT:
            exit()
    screen.fill(bgc)


but when I run it, the screen is black, not the color I specified.