Ok, so I mentioned that 'particles' are "created on the fly and positioned according to a simple set of rules", what exactly are these rules?
Each particle emitter that is created is first set up with a bunch of parameters controlling how the particles are emitted, here is a list of those parameters:
frequency : This is the rate at which new particles are created in milliseconds, so a value of 20 would mean the emitter will produce new particles every 1/50th of a second (or quicker that the period the human eye can actually distinguish!).
life : This is simply how long the particle should exist for, again in milliseconds.
offset : The position relative to the emitter position that a particle should start from.
speed : How fast the particle should move (and the direction as this is a vector).
scale : How big to display the particles.
rotation : The rotation speed of the particle (remember it is camera facing so this is +ve for clockwise -ve for anticlockwise).
alpha : How see-through the particle is (this is actually very important as we'll see later).
animspeed : Bit weird to get your head round to begin with, if you have 64 frames in the sprite sheet the a value of 1 would be 64 FPS, if you have 16 frames then 1 would be 16 FPS. If you wanted a 64 frame sheet to animate at 32 FPS then the value would be 0.5.
There are a couple of other control variables but before covering those I want to expand on the 'rules' I mentioned first.
For some of the variables above you don't specify a single value, what you do is specify a range of values and for each particle emitted the emitter chooses a random value between them.
For offset there is offsetMinX, offsetMinY, offsetMinZ, offsetMaxX, offsetMaxY and offsetMaxZ.
For example if you wanted a particle to be emitted above the emitter position by 200 units you could set offsetMinY and offsetMaxY to 200 and that will do the trick, but much more interesting is when you want to have the particles start somewhere above 200, say within 50 units, then you simply set offsetMinY to 200 and offsetMaxY to 250. Now each particle will pop into existance at a random position within the specified points.
(if using the 'player position' type of emitter and you set the offset values to -200, 200, -200, 200, 250, 200 then the particles would all pop into existance in a box above the players head, no matter where the player goes. Good for snow or rain or volcanic ash falls.)
Some variables have a 'start' and 'end' specification, for example if you specified scaleStartMin and scaleStartMax as 1 and scaleEndMin andscaleEndMax as 10 then the particles would all pop into existance as 1x1 square size and would grow to 10x10 square size at the endo of the life period.
To Be Continued.
Been there, done that, got all the T-Shirts!