0

I'm building a basic PyGame game, to start it I would like a basic countdown, however when I blit it to the screen, the next number overlaps with the previous one, until you just get a white mess on the screen - how can I rectify this? My code is this:

    for i in range(10):
        starting_countdown = initialise_font.render(str(11 - i), True, 
        (WHITE))
        t.sleep(1)
        screen.blit(starting_countdown, (350, 300))
        pygame.display.update()

Thanks for any help!

Dan Hill
  • 43
  • 5
  • 1
    You have to fill the screen every iteration of the for loop to clear it, e.g. `screen.fill((120, 120, 120))`. Also, if you want to implement a proper countdown timer, take a look at [these answers](https://stackoverflow.com/q/30720665/6220679). – skrx Feb 17 '18 at 14:57
  • Thanks a lot, sorted now :) – Dan Hill Feb 17 '18 at 17:23

0 Answers0