4 Hugues Ross - Blog: Chainsaw Deathrace Design #3: Speak up!
Hugues Ross

1/4/13

Chainsaw Deathrace Design #3: Speak up!

Wow! My last few posts were kinda depressing. Let's brighten things up with a two post day: Design post now, status update later. Enjoy!

So, this also has nothing to do with speed. That's because I'm currently rethinking how I want to handle that. Let's instead talk about a new feature that I want to implement: Sound.

In version 1, getting Billy/Sammy close enough to the Chainsaw Killer would  bring up the message: "[name] hears a chainsaw revving!" This worked alright due to the lack of sound in the game. To tell you the truth, prior to my second Sprint project, I didn't have any sort of audio system in place. I do now. However, that's a little unrelated. I want sound, ingame or not, to be a gameplay mechanic of its own. Here's how it works:

Let's say Billy falls down some stairs. That would be fairly loud. If an enemy was close enough, they might hear Billy fall and know where he is, even if he can't be seen. However, let's also say the Chainsaw Killer is chasing him. Now, the chainsaw could possibly drown out most other sounds. The enemy would not be alerted. This works for the player too. If they hear something, like a chainsaw, they'll also be told what direction it came from. Be forewarned: If the sound is too faint, the direction may not be accurate! Depending on the sound's "strength," the direction may be offset. Also, keep in mind that the chainsaw you hear is just a chainsaw, not necessarily the killer himself.....

How do I plan to add this to the game? Things will create a sound, with a position and strength. Depending on the strength, it will reach everything with ears within a certain range. Then, on something's turn, it compares all that it "hears." Currently, it works like this:  take the strongest sound's strength, and halve it. Everything with less strength cannot be heard. Everything else loses half of the minimum strength. Then, the directions are determined by strength. Let me bring you a visual example:
Let's pretend that the Killer's sound reaches ??? with a strength of 400, and Billy's sound is 155.

1. 400 is highest, so we halve it to get 200.
2. Since Billy's sound, 155 is less than 200, it is drowned out.
3. ??? hears the Killer quite clearly, but that's it.

But what if Billy's sound was 255?

1. Same as before
2. Billy's sound is now higher than 200, so it stays.
3. We take half of 200, 100, then subtract that from Billy's sound.
4. ??? hears the killer's chainsaw with a strength of 400, and Billy's trip down the stairs with strength 155. It now knows where Billy is, and probably goes in to attack. Billy crawls off to the left.

I hope this post wasn't too confusing. The next design post will probably be what I wanted to write about before. Later today, I'll be posting a quick update on what I've actually gotten done.

No comments: