The higher the value, the more it travels in that direction. The reason I say 'MORE' in a specific direction is because other factors affect the direction our particle travels.
xspeed and yspeed help to move the particle in the direction we want. We use this variable to pan into and out of our scene.
Define just tells our program that MAX_PARTICLES will equal whatever value we specify. The third line will be used to toggle 'rainbow mode' off and on. sp and rp are variables we'll use to prevent the spacebar or return key from rapidly repeating when held down. If xspeed is a positive value our particle will be travelling more to the right.
It's important that you understand what's going on, so please read carefully :) We reset the Modelview Matrix only once.We'll use this to predefine the particles and to draw the particles to the screen.col will be use to keep track of what color to make the particles.I borrowed no ones ideas, and I had no technical information sitting in front of me.I started thinking about particles, and all of a sudden my head filled with ideas (brain turning on? Instead of thinking about each particle as a pixel that had to go from point 'A' to point 'B', and do this or that, I decided it would be better to think of each particle as an individual object responding to the environment around it.