How to Fade Your Screen in Pygame [CODE IN DESCRIPTION]

Profile Picture
Published on Mar 13, 2018🌏 Public

In this video I will be showing you how to fade your screen in pygame using python 3. This is very simple and easy and will only take a few minutes. The code can be found down below. CODE: ---------------------------------------------------------------------- def fade(width, height): fade = pygame.Surface((width, height)) fade.fill((0,0,0)) for alpha in range(0, 300): fade.set_alpha(alpha) redrawWindow() win.blit(fade, (0,0)) pygame.display.update() pygame.time.delay(5) --------------------------------------------------------------------- Please leave a LIKE and SUBSCRIBE for more content! Tags: - Tech - Tech With Tim - Crypto - Programming - Coding - Python - Pygame - Fading Screen