Search Results

Saturday, June 18, 2011

X-Emitter V1.8

Hey. So, here's another release of the X-Emitter. This version revamped the emission process, meaning that this version of the X-Emitter won't be backwards compatible out of the box with any previously existing particle systems.

The reason that it isn't backwards compatible is because the process has been optimized to work with a single emitter, rather than others. A noticeable problem with the X-Emitter the way it was before was that while calculating all the emitter's particles inside of the emitter is faster than running the logic on the particles themselves, the effect is lost if you have many emitters, since the number of logic bricks for each emitter rises, as well.

To alleviate this slowdown, I centralized the calculation process to a single object - when the particles are added, they are assigned to a global dictionary of particle systems with their particles. For example, XParticle.Generic is an entry in the logic.partsys dictionary; so, logic.partsys['XParticle.Generic'] is a list of all particles under that system. That system name is also the name of the function to run to calculate the particles.

So, all of this is to say that particles simply have a parttype property, which is assigned the name of the function to use to calculate the particles. If a particle doesn't have this, it will default to 'XParticle.Generic'. So, to use your own function, you would use 'Modulename.Functionname', like 'MyParticleModuleFile.Fire'. The X-Emitter will automatically import the module and will run the function to calculate that system's particles.

This revamp also destroys the need for the emitterkill variable, since you can just destroy the emitter now, and the particles will continue to be calculated. If the particles' emitter doesn't exist, then it will also destroy itself, once its time is up.

If an emitter in the demo file isn't running, check to make sure that its emitteron property is set. If there's an error in the console, please tell me so I can fix anything.

That was a lot of text. Anywho, this version's faster than the last ones (I think). Oh, and by the way, I added a simple scene in the test blend file to show a simple emitter up and running.


As always, have fun!


  1. CollisionTest doesnt work like it used to.
    In 1.7.2 the smoke would slide up the sides of the sphere.
    in 1.8 it just stops and disappears.
    All others look good to me :D

  2. The life is a lot lower - set it higher to see the particles climb.

  3. ... so obvious it hurts.

    How about the snow emitter? if its obj center isnt in view, it doesnt appear to emit anything? sorry if im hassling, i just love this thing to bits lol.

  4. No, no problem. I must have left the 'emittercull' property on on the Snow emitter. Disabling it should work.

  5. how can this help me to build a city in BGE????????