Answers for "Pygame 'fading' VFX (Visual effect)"

0

Pygame 'fading' VFX (Visual effect)

Fade_Surface = pg.Surface((width, height)) #If this doesn't work, then use: pg.Surface(width, height)
Fade = 0

if Fade < 100: #You can use another value
    Fade -= 1 #Again you can use another value
    Fade_Surface.set_alpha(Fade)

Screen.blit(Fade_Surface, (0, 0)) #Your screen where everything is rendered and what is seen
Posted by: Guest on January-27-2022

Browse Popular Code Answers by Language