This hasn't been tested but it should work, the general idea is there anyway :) //------------------------------------------------------------------------------- //Firstly you need a particle type: typedef struct { int on; // whether particle is active int x; // screen y pos int y; // screen y pos int dx; // amount it moves per frame in y dir int dy; // amount it moves per frame in y dir int age; // how many frames it's been onscreen } Particle_type; //------------------------------------------------------------------------------- //then you can define a bunch of particles in an array: Particle_type particle[50]; //------------------------------------------------------------------------------- //turn all your particles off before starting you main loop void InitParticles() { for (particle_num=0; particle_num<50; particle_num++) { particle[particle_num].on=0; } } //------------------------------------------------------------------------------- //now you need a procedure to handle the particles every frame, this will //be called once per frame in your main loop, you'll have to write your //own DrawParticle func: void HandleParticles() { for (particle_num=0; particle_num<50; particle_num++) { if (particle[particle_num].on==1) { particle[particle_num].x += particle[particle_num].dx; particle[particle_num].y += particle[particle_num].dy; particle[particle_num].age++; if (particle[particle_num].age >50) particle[particle_num].on=0; //means particles last for 50 frames DrawParticle(particle[particle_num].x, particle[particle_num].x); } } } //------------------------------------------------------------------------------- //lastly you'll need func's to spawn the particles onto the screen, this //will depend on what you want the particles to do but to make a simple //explosion at xpos,ypos: void SpawnParticleExplosion(int xpos, int ypos) { for (particle_num=0; particle_num<50; particle_num++) { particle[particle_num].on=1; particle[particle_num].x=xpos; particle[particle_num].y=ypos; particle[particle_num].dx=rand()%10-5; // -5 to +5 particle[particle_num].dy=rand()%10-5; // -5 to +5 particle[particle_num].age=0; } } //this has several problems: it will not check if particles alread exist //it will just reassign all of them to the current explosion, plus all //the particles will dissappear at the same time.