I'd like to be able to make the screen like blurry and wavy, like when a player enters a portal in Minecraft.

How would I make this with pygame?


1 Answer 1


My suggestion would be to use surfarrays in conjunction with NumPy.

Assuming you already have an algorithm for the post-processing effects you want, all you'll have to do is port it into NumPy syntax, which will probably just take some tinkering. Examples of usage can be found here, here, here, and here.

After manipulating the surface, you just have to take whatever is output and blit it back to the screen.

A word of warning: full screen processing in pygame, even with surfarrays and NumPy, can be very slow. I once tried to create a desaturation post-processing effect for a pygame game, and struggled to get the game to run at 30fps at something like 640x480 resolution. Of course, if you get speedy results, I'd love to see how you did it :)

  • \$\begingroup\$ Great, I will start doing some work on this. I haven't really done any algorithm for this, but I will start working on it right now. This was a great answer, thanks a lot! \$\endgroup\$
    – user35344
    Commented Sep 25, 2013 at 11:53

You must log in to answer this question.