Sprint 5 – Jumanah’s Blog Post

The focus of this sprint was enhancing the wind and rain effects.

Since Luk is working on changing libraries with Kinect, we have decided to postpone combining code, so this is once again a separate xCode project.

During this sprint I worked on having the rain particles interact with the fire and put out the fire eventually. I was able to get this working finally, after setting a rate at which rain particles are attacking the fire per 100 frames, and eventually this will result in a value that will stop drawing fire particles. So every 0 to 100 frames I will check the number of rain particles near the fire, and return a rate.

Then I multiple this rate r by the amount of particles i am adding to the  fire scene per update.  Eventually the rate becomes too strong and the fire has no fire particles. I bring it back to life.

   fire.addParticles(7*(1-r), X*(1-r), Y*(1-r), lifeOffset*(1-r), PARTICLE_STATE_FIRE); //add new particles

    

    if (fire.returnSize(PARTICLE_STATE_FIRE) < 0){

        

        fire.addParticles(7*(1), X*(1), Y*(1), lifeOffset*(1), PARTICLE_STATE_FIRE);

    }

 

I also worked on wind, giving a positive X direction gravity

  //WIND EFFECT

    else if (timer > 300 && timer <= 600){

        

        fire.setGravity( ofVec2f( 0.03, –0.07 ) );

        windTimer++;

    }

   This sprint was much more successful than the last sprint because the fire actually changes now depending on the surrounding environment. Whats left is to have the user protect the fire somehow.

The next sprint we will work on user interactions that will prevent the fire from being put out and puppet mapping.

Jumanah

Advertisements

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s