Programming Project, day 23 – Particle Effects!

I didn’t use math vectors, but the same principle. These are my direction and “movement” formulas. The direction variables are set between -1.0 and 1.0 and are then used when calculating “movement” of each particle.

m_fDirX = (rand()%200-100)/100.0f;
m_fDirY = (rand()%200-100)/100.0f;

m_fX += m_fDirX*m_fSpeed*p_fDeltaTime;
m_fY += m_fDirY*m_fSpeed*p_fDeltaTime;

There are other variables to the particles, this is most of them: a resize timer; an angle and an alpha;

This is the result! I’m very happy with it.

Image

Image

Image

Image

Screenshot 2014-01-12 17.04.11 Screenshot 2014-01-12 17.04.12

This entry was posted in 5SD022. Bookmark the permalink.

Leave a comment