Monday, November 4, 2013

Homework 14: State

 This first state diagram describes the state of the player's health bar, smoke protection sphere, and heart rate while in the world map.  You can see that initially, the players health is at full and their heart rate (indicated by an audible heart beat) is nonexistant.  Since the size of the sphere is directly proportional to the health remaining, the sphere radius is at its maximum at this point.  Once the player enters the world map, the health, sphere size, and heart rate are set to particular values.  The health (and sphere) will decrease at a constant rate as the smoke creeps in on the player (increasing the heart rate) or if the player is attacked.  The health can be raised (increaing the size of the sphere and decreasing the heart rate) if the player finds a "health booster".  Once the health reaches a minimum threshold, the sphere collapses, the player is consumed by the smoke and thus their heart rate stops.  The palyer is dead and the game is over.  All attributes are reset once the game is restarted.  There could also be the possibility of reviving, in which case the attributes would return to some level.


This state diagram describes the movement and sound attributes of the smoke monster which attacks the player when they are in the world map.  The smoke monster (seen in my previous post) starts silent and hidden until it is time to appear.  At this point it begins moaning and circling around the player's protective sphere.  When it is time to attack, it begins screaming and enters the sphere, heading towards the player.  If it hits the player, then it starts laughing and exits the protective sphere.  If it is instead hit by the player, it begins crying and slowly disappears.  Either way, the creature then disappears and reenters the initial state of silent and hidden.

No comments:

Post a Comment