Wednesday, June 16, 2010

2D Particles: Part 8 Even More Options Part 2

Welcome to the eighth part of the 2d particles tutorial. It has been a while since I last posted and hopefully I post more frequently now that school is over and its summer. So lets get to it. In this final part of the tutorial we will add particle fading in and out as well as color interpolation. This is not very difficult all we are going to do is add in an enum representing the different styles of fading which we will use to update our particles. Also we will add in three color variables in the particle class, a starting color, ending color, and one to use to draw. And that will be all for this tutorial. I might do a slightly more advanced particles tutorial later that will use emitters and potentially be in 3d not 2d. So without any more delay lets begin by creating our fade style enum in our particle class above the Particle class itself, see source if you do not know where.