Jumanah’s blogpost for Sprint 3

During this sprint I worked on adding another type of particle system, the rain particles. Our group discussed the best way to add different types of particle systems to our code. I experimented a little with inheritance and derived classes but I faced some challenges. With the prof’s help we realized that for the scope of this project it would be best to use C++  ENUMS to define particle states. As such I created a project constants header file with the ENUM definition:

typedef enum {
} particleType;

This would be scalable to add other particle effects such as wind and smoke. In the rest of the code I added conditional statements to execute code based on the particle state chosen.

For the rain, I give it a wider range of position, scoping to the width of the window, and a longer lifespan than the fire so it eventually reaches the ground. The particles for now are just a blue ellipses, but may be changed to images later on.

In the code we added a timer system to go from night to day, as such for the simplicity of the alpha presentation I made the rain start and finish from 500 to 3000

if (timer > 500 && timer < 3000) {

rain.addParticles(1, X_RAIN, Y_RAIN, lifeOffset_RAIN, PARTICLE_STATE_RAIN);


Later on the rain particles will need to start and stop randomly, and also put out the fire if they are in contact with it. This should be implemented in the following script.

The code and methods were very similar to that of the fire, and so it was quick to reuse code.

The overall result of adding rain to the environment looks like this:


During this sprint I learned how to use GIT on my local machine for version control. It was really helpful as we did a lot of changes to the code that were reversed.

Lastly, our team as combined codes into one project (Particle Systems and Kinect) for our Alpha Presentation.

The next steps are to work on the user and rain interaction with Kinect and the rain interaction with the fire itself..I will also be starting the wind particle effect, and working on user interactions.



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s