Particles File

You can add particle emitters anywhere in a track. Simply add an empty, give it the type Particle emitter, and in the particle kind property enter the name of the file describing the particles you wish to use.

For a list of currently available particle files, check the data/gfx folder. You should be able to create new particle types by duplicating an existing one and tweaking its properties.

Point emitters

Point emitters may be created like this :



velocity indicates in which direction the particles move, and at which speed

spreading angle indicates by how much particles may randomly deviate from their base direction as defined by their velocity

material contains the name of the file to use for the particles and other settings. This works starting from SuperTuxKart 0.8! STK 0.7.x users, instead use

<material file="_particle_sand.png>

and also add the file at the very top of materials.xml.

rate indicates the amount of particles that are to be emitted per second (the precise rate will randomly vary)

  • decay_rate=value (optional) if set and greater than 0, will make the emission rate diminish by value particles per second until emission stops. Useful for bursts like explosions.

lifetime indicates how long a particle lives before disappearing, here too a value will be picked randomly between min and max

size indicates the size of each particle, here too a value will be picked randomly between min and max

To create a particle that grows over time, add "increaste-factor" properties like this :

   <size min="0.65"
         max="0.95"
         x-increase-factor="0.6"
         y-increase-factor="0.6" />

color indicates the color applied to particles (255,255,255 is white and means no coloring is done), here too a value will be picked randomly between min and max

fadeout time is an optional effect that will make particles fade away gracefully at the end of their file, instead of just disappearing. The given time is the number of milliseconds before the end of a particle's life where the fadeout should occur

gravity is an optional effect that will make particles deviate from their initial velocity towards the ground; only-force-time indicates how long it takes for gravity to "take over" the original velocity

Box Emitters

All parameters are similar, except the opening tag is

<particles emitter="box" box_x="12.0" box_y="0.5" box_z="12.0">

where box_x, box_y and box_z indicate the size of the emitter box


Sphere Emitters

All parameters are similar, except the opening tag is

<particles emitter="sphere" radius="0.3">