Jumanah – Sprint 8

During this sprint I worked on having the wind put out the fire and introducing an obstacle for running out of fire wood… which would effectively also put out the fire.

 

The first thing I did was create an outWood bool variable, which would control if we draw the wood on the screen.

if (outWood == false) {
fireplaceWood.draw(400, 670, 200, 79);

}


 

The second thing I did was add it as an obstacle type. It is incomplete as Luk needs to perform a user interaction and wood will need to drop for the outWood variable to be set back to False. Right now this is just a placeholder.
else if (obstacleType == 4) { //Running out wood

if (timer < obstacleTimer) {

obstacleB = true;
outWood = true; //we wont draw the wood
cout << “Please

restock your wood” << outWood ;

}
else if (timer == obstacleTimer) {

//time for a new obstacle
outWood = false;  //this will draw the wood again, but

realistically.. the user should perform an interaction to replace the wood.
obstacleB = false;

}

}

The last thing I worked on was not adding fire particles when wind or out of wood condition exists.
if (w == 0) { //sprint 8 if no wind and theres rain 😉
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);
}
}
else if (w > 1) { // if wind exists..
//dont add fire

particles

}

3 files modified

ParticleSystem.cpp
ofApp.h
ofApp.cpp

 

For next sprint our plans are to refine animations within the environment and work only on user interactions with Kinect, now that our environment and obstacles are up and running. Spare wood will also be needed to be added to the scene when the firewoods health goes down.

 

 

 

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