pygame is
Simple DirectMedia Layer is
Site Swing

PyIgnition - Beta 2

David (animatinator)



PyIgnition is a particle effects library I'm working on for easy implementation of particle effects in Pygame programs.

Current features

  • Fully customisable particle sources:
    • Particles' starting velocities and directions can be completely controlled, and you can set random ranges for both
    • Particles per generation, and the spacing between generations, can also be easily altered
  • Fully customisable particles:
    • Six different drawtypes are available: point, line (of fixed length), scaleline (which scales with velocity), circle, bubble (an unfilled circle) and image (for which you can specify an arbitrary image file)
    • All parameters are fully customisable, from line length to bubble colour, and you can also change the particle's drawtype in real time
  • Powerful physics system:
    • Particles' paths can be influenced by an unlimited number of gravities, which can be either directed (constant in one direction) or point gravity (following an inverse square law around a point). Gravity strengths, positions and directions are modifiable and you can set a random range for strength to simulate effects like blusterous wind
    • Obstacles can be added to simulations which particles will deflect off, making effects more realistic as they appear to interact with their environments. Obstacles can be either circles, rectangles or boundary lines, all of which have fully customisable parameters
  • Highly versatile keyframe system:
    • Pretty much every single parameter can be individually keyframed in real time, allowing you to create incredibly complex effects
    • Particle keyframes can be created with sources so that they will be copied to every particle the source produces. The effects of these keyframes are then pre-calculated by the source so they needn't be worked out for every single particle, resulting in good performance even with very elaborate animations
    • Further optimisations include a function for consolidating all keyframes from past frames into one single keyframe on the current frame, which when used regularly will significantly speed up animations involving large numbers of keyframes - especially when keyframes are being constantly added by the program
    • Keyframes can use either linear or cosine interpolation, and can switch between the two mid-animation if needed
  • Unlimited number of independently-managed particle effects, each using its own sources, gravities and obstacles

Included demos

  • - click to add spiffy colour-changing bubbles which gently drift off into the sky
  • Catherine - a nifty catherine wheel effect created using a rotating source, with image particles for sparks
  • Controlled - an elaborate animation which makes use of all the current features to show off PyIgnition's capabilities. This is also the one pictured in the screenshot
  • PyIgnition test - - The old fire demo, now with a rectangular obstacle which the flames will deflect off and wrap around in a fairly realistic fashion
  • - the original demo with line particles flying around the screen (driven slightly mad by keyframed point gravities)
  • - A rather system-intensive demo with six obstacles and many circular particles used to create a water-like effect
  • - Initially just a demo of randomised horizontal gravity being used to create wind, this now includes a circular obstacle locked to the user's cursor which can be used to bat the stream of particles around the screen

Planned features for future releases include several new gravity types and obstacles, a file format for storing and loading particle effects (so you don't need to create them manually within your program) and a separate application for creating effects.

Usage instructions are available from here.


Release notes

This is a minor yet vital release which adds a few much-needed improvements to the initial 'Controlled Eruption' release and includes the new Controlled Eruption demo.


  • Added a function to consolidate keyframes up to a point, so as to prevent constant memory usage growth in programs which set particular variables on every frame Added an argument to CreateKeyframe() functions which allows the user to specify the interpolation type
  • Fixed a bug which caused a crash whenever a particle was located at an obstacle's origin point

And the release notes for Beta 1, which I forgot to post here:
This release implements the new keyframing system which allows implicitly separate keyframing of variables whilst extending keyframing to obstacles as well. It also introduces a significant speed improvement in particle keyframing, as keyframed particle values are now pre-cached.

I'm also pleased to say that the first version of the pdf user documentation is finished - you can download it from here.


Home Page:


click to view original size


PyIgnition - Beta 2 - Jul 13, 2010
PyIgnition - Alpha 3 - Jun 22, 2010
PyIgnition - Alpha 2 - Jun 12, 2010
PyIgnition - Alpha 1 - Jun 9, 2010 account Comments

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

April 8, 2011 3:22pm - alex jones - nickname: (alextigernick)
This would be nice if there was any docs.
His code is almost impossible to understand
July 14, 2010 6:06pm - David - nickname: (animatinator)
Thanks :)
Glad the wx test helped. I'd actually forgotten about that; I was going to post it as a demo here so that other people don't have to spend ages messing around to get it to work like I did :P I've done so now anyway:
The version there will probably be more useful to you as it is more general with cleaner code, and I've also got it to redraw properly (you'll notice that the slider at the top doesn't draw until you resize the window in the demo included with PyIgnition).
July 13, 2010 12:10pm - James - nickname: (monkjr) - 5/5
First, nice particle library.
Next, your "wx test" helped me very much!
I had been wondering if it was possible to put pygame in a wx window and how to do it.
July 10, 2010 2:33pm - David - nickname: (animatinator)
Apologies for the massive delay. Just in case anyone's wondering whether the project is still going, fear not; I've actually completed another two releases since the last update here. However, I've been trying to get the user manual finished before I post again. Fortunately it's actually getting there now and should be finished within a day or two - yes, I know I said that last time, but I had massively underestimated the complexity of the thing (it's getting on for 2500 words at the moment :P ). Watch this space!
June 29, 2010 7:20pm - David - nickname: (animatinator)
Thanks for the comments!
Just a quick update on progress. The manual's about half-finished at this point, and I should hopefully have it done within a few days. And then the library will be useful to other people besides myself! Hoorah! :P

Meanwhile, the next release planned will be Beta 1, which will have a vastly improved keyframe system allowing you to key individual variables separately (at the moment, when you create a keyframe you have to specify what every parameter will be on that frame, and ones you don't specify default to zero). At the moment the new keyframe system is fully implemented, but unfortunately the library has slowed to a crawl as a result - the fire demo now averages around 15 fps after a few seconds. The main cause of this is particle keyframes, as the new function for interpolating between keyframes is a bit slower than the previous one (due to being more complex). When it's being run for several thousand particles every frame this slight decrease in speed makes a massive difference. The solution I've come up with is to pre-calculate particle variables for every frame in their lifetime, or at least for every nth frame, and then simply use those values instead of interpolating between the same keyframes for every particle. This would involve an increase in memory usage (around 5k or so for an average-size simulation), but the speed improvement would be massive so I think it should be worth it :-)
June 28, 2010 11:52pm - Andy Hanson - nickname: (rhodiumgames)
I am considering using this.
June 27, 2010 5:18pm - Resheet - nickname: (mint) - 5/5
Totally cool! I can't wait for a manual!
June 14, 2010 5:21pm - David - nickname: (animatinator)
Aah crud, forgot about the spark image. It's sorted now; I've added it to the zip file :)
June 14, 2010 10:46am - Xandar Kablandar - nickname: (eternalcheesecake) - 4/5
Very nice.

When I try to run Catherine, I get a fatal error saying "pygame.error: Couldn't open Spark.png"
June 10, 2010 1:46am - PyTy - nickname: (ty5479) - 5/5
Awesome, Keep up the great work.

our projects welcomes all python game, art, music, sound, video and multimedia projects. If they use pygame or not.
recent releases
Jan 7, 2017

Dec 30, 2016

Dec 21, 2016

Dec 8, 2016

Nov 28, 2016

Nov 27, 2016

Nov 24, 2016

Nov 20, 2016

Nov 14, 2016

Nov 6, 2016

Nov 5, 2016

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