pygame is
Simple DirectMedia Layer is
Site Swing
plasma in python

plasma in python - 1.4

Sean McKean (asona)



A demo effect using a palette in 8-bit mode to create a visually appealing experience. This program is based on C++ code written by Alex Champandard, from an article on demomaking (url:


v1.4: Added more command line arguments to, so configuration is easier outside of editing the program.


Home Page:


click to view original size


plasma in python - 1.4 - May 13, 2008
plasma in python - 1.3 - May 10, 2008
plasma in python - 1.2 - May 9, 2008
plasma in python - 1.1 - Apr 23, 2008
plasma in python - 1.0 - Apr 17, 2008 account Comments

If you wish to leave a comment with your account, please sign in first.

May 10, 2008 9:54pm - Sean McKean - nickname: (asona)
Runs much faster, with the help of an 'add_overflow' option added to the Surface.blit function.
April 28, 2008 2:15am - Sean McKean - nickname: (asona)
Wait -- adding an alpha channel would make the surface 16 bits per pixel. What I meant was adding an alpha channel to a surface that uses a palette. I also looked at the pygame.transform.average_surfaces() function added in pygame 1.8, but it seems to have strange behavior with a paletted surface (although it seems to do a nice job with cross-fading RGB surfaces).
April 24, 2008 12:35am - Sean McKean - nickname: (asona)
Thanks for the input!
pywiz32: I think I see what you are saying. The problem here is that to setup a cross-fade effect, I am guessing that I'd have to render a set of intermediate surfaces, which could take any number of seconds, depending on the machine running the program. It's a shame that 8-bit surfaces and alpha effects don't work together.
April 23, 2008 7:39pm - Anonymous - nickname: (pywiz32) - 5/5
Even better. One last suggestion: for the scene change, try to make it more smooth. The way to do this is to have the effect on a surface, and then load another scene on a seperate surface, and finally fade between them.
April 17, 2008 9:16pm - Anonymous - nickname: (pywiz32) - 5/5
Damn... Awsome... Though, make it more comprehensible, add more comments, so developers can make it better. I also changed a few variables around, and the image, raw file, so there is no movement in the plasma, just color change, and so there is no text in the middle. I will have a screensaver ready in a few hours :) Also, consider making it so that each "bubble" gradient moves around and changes shape, that would be awsome. Still, really cool.
April 17, 2008 11:20am - pymike - nickname: (pymike) - 5/5
Woah. This is really awesome. I wish I could make it my screensaver... ;-)
April 17, 2008 7:41am - Francesco Mastellone - nickname: (effeemme) - 5/5
Damn cool! Definitely gonna read those articles.

our projects welcomes all python game, art, music, sound, video and multimedia projects. If they use pygame or not.
recent releases
Nov 27, 2014

Nov 13, 2014

Nov 11, 2014

Nov 10, 2014

Nov 9, 2014

Nov 6, 2014

Nov 4, 2014

Nov 3, 2014

Oct 28, 2014

... more!
for pygame related questions, comments, and suggestions, please see help (lists, irc)