https://makingtoys.net/2011/02/07/i-shall-call-him-meat/
1 -Explain your code
As a team, we decided to make one creature a predator and the other its prey. The code we attempted to write had varying levels of behavior based on the abruptness of changes to the creature’s situations in a way that made it have apparent character.
Since I worked primarily with the “prey” model (I call him “Meat”), I wanted my guy to exhibit the behaviors of a dayturnal prey animal. So, he’s pretty happy when there’s light and begins to panic when darkness falls. If there is abrupt darkness, he screams and the shock kills him. I also wanted to add a “Lazarus function” to revive him with a bright burst of light.
After monitoring “normal”, “bright”, and “dark” values from my photoresistor, I started to structure the logic around “if this … then this”, writing functions for each. Then, I tried testing different pitches and lengths of tones to determine what sounds made the most sense. For example, I have the scream raise in pitch as a steady tone until it is almost unbearable to hear. It is followed by a crunchy “death” sound and silence. When he’s happy, however, he plays a Major 3-note progression, kind of like happy whistling. As his panic rises, the speed of his sounds increases to simulate frantic fear.
The code relies heavily on conditional statements in order for the creature to respond to his situation and the degrees of change in it.
2-What did you do that was innovative, non-obvious, and useful?
I think making a sense of panic from the sounds was a bit non-obvious. One might think he should only get less happy-sounding, but I think if we are going to sell the idea that he is afraid of the dark because he might get eaten, he should have a sense of panic, almost like rapid breathing or heart-beats. Whether or not it is innovative, I am not sure, but I definitely think it is useful in telling the story of “Meat” and his antagonist.
I also think the idea of having two creatures, one predator and one prey, completes a fuller narrative than “Meat” could do by himself. The fact that there is another creature “Eater” stalking him in the dark adds dimension to his character.
Reply