what's the difference between pygame.display.update() and 
pygame.display.flip()  ?

--- On Sat, 1/10/09, Thiago Chaves <shundr...@gmail.com> wrote:

From: Thiago Chaves <shundr...@gmail.com>
Subject: Re: [pygame] screen.fill() not working
To: pygame-users@seul.org
Date: Saturday, January 10, 2009, 7:16 PM


-----Inline Attachment Follows-----

Hi,

You forgot to update the screen.

http://www.pygame.org/docs/ref/display.html#pygame.display.flip

You should call either pygame.display.flip or pygame.display.update
after you finish drawing on the screen.

-Thiago

On Sat, Jan 10, 2009 at 10:26 PM, Yanom Mobis <ya...@rocketmail.com> wrote:
> 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.
>
>
>
>
>
>



      

Reply via email to