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

Re: [pygame] font/text in pygame - code in, but display at wrong time?



On Wednesday 27 Apr 2005 7:17 pm, D. Hartley wrote:
> So I tried to import this (working!) code into my game, and even
> tho it executes the function within which it's contained BEFORE
> waiting for the "y/n another game" response, it's not displaying the
> score then (I just managed to glimpse it in the second after I hit n,
> the score flashed on right before the window closed. So I know it's in
> there and works! Just not at the right time.)

The problem is probably just that you forgot to put in a pygame.display.flip() 
after you run your add_score() function.

Remember that the display is double-buffered, so you need to call 
pygame.display.flip() every time you wish to draw the screen.

-- 
James Reeves
http://www.monkeyengines.co.uk/