This is a series of functions in a DBPro source file that allow for 2D particles.
I have wanted one of these for a while and found other particle addons to be complicated so i decided to create one on my own. At this stage there is only a few basic commands but i do want to continue expanding it to allow for some more complicated functions.

- Feature Added

- Feature In Progress

- Feature Abandoned

- Feature Suggested
31/10/12
Particles
Particle Emitters
Basic commands added
Circular shaped particles
Adding images for particles
Allowing for selecting a point for the particle to go to
Command List:
*IMPORTANT*
Use the command 'SetupParticles()' at the start as this sets up important arrays!
Particle Commands:
UpdateParticles()
This updates all particles. It involves both movement calculation and drawing of them
CreateParticle(XPos, YPos, Width, Height)
This creates a particle at XPos and YPos of the specified Width and Height
*Note:* This returns the ID of the particle created (This is needed later)
SetParticleColour(ID, Colour)
This will set the colour of the particle
SetParticleVelocity(ID, Velocity)
Sets the velocity of the specified particle
SetParticleAngle(ID, Degrees)
Specifies which direction the particle will go (Remember 0 is east, 270 is north)
SetParticlePosition(ID, XPos, YPos)
Sets the X and Y position of a particle
SetParticleSize(ID, Width, Height)
Resets the size of a particle
SetParticleLifetime(ID, Lifetime)
Sets the lifetime of a particle (1000 is one second)
FreezeParticle(ID)
Freezes a particle (Lifetime will also not be counted down)
UnfreezeParticle(ID)
Unfreezes a particle
HideParticle(ID)
Hides a particle (It will still move but it will not be drawn)
ShowParticle(ID)
Shows a previously hidden particle
GetParticlePositionX(ID)
Returns the X position of a particle
GetParticlePositionY(ID)
Returns the Y position of a particle
Emitter Commands:
UpdateEmitters()
Updates all emitters. Involves creation of particles and movement of emitters
CreateParticleEmitter(XPos, YPos)
Creates an emitter.
*Note:* Returns the ID of the emitter created
TurnOnEmitter(ID)
Turns on an emitter
TurnOffEmitter(ID)
Turns off an emitter
SetEmitterPosition(ID, XPos, YPos)
Sets the X and Y position of an emitter
SetEmitterAngle(ID, Angle, Inaccuracy)
Sets the angle that the particles fired will have
SetEmitterColour(ID, Red, Blue, Green, RedInaccuracy, BlueInaccuracy, GreenInaccuracy)
Sets the colour of the particles that the emitter is firing. The inaccuracy's can be set to 0 for no inaccuracy
SetEmitterLifetime(ID, Lifetime)
Sets the lifetime of the particles emitted by the emitter
SetEmitterFrequency(ID, FrequencyDelay)
Sets the delay between particles (1000 is one second)
SetEmitterVelocity(ID, Velocity)
Sets the velocity of the particles fired
SetEmitterToFollowParticle(EmitterID, ParticleID)
Locks the emitter to a particle
StopEmitterFromFollowingParticle(EmitterID)
Stops the emitter from following a particle
This is just a first build of this so things are very likely to change. Suggest any ideas below and i will see if i can implement them.
The program is attached with the function code. A small demo is also included to show simple things that can be achieved with the program.
Pictures can be found here(I would advise downloading it for yourself though because its better to see it moving)
http://littlegg6.blogspot.co.uk/2012/11/2d-particles.html