combat music gives the badguys away! when to switch to/from combat music

Started by
21 comments, last by Norman Barrows 8 years, 5 months ago

combat music gives the badguys away! when to switch to/from combat music?

so your wandering across some game world, and all of a sudden the combat music starts. obviously there's bad guys somewhere! i think its happened to all of us.

or the music keeps blaring on after all the bayguys are dead, until you sheath your weapon. that kind of thing.

so what are good trigger conditions for starting and stopping combat music?

when the player becomes aware of combat? as in hostile attempts an attack? or hostile nearby and player draws weapon?

and stop when hostiles are dead or sufficiently far away?

Norm Barrows

Rockland Software Productions

"Building PC games since 1989"

rocklandsoftware.net

PLAY CAVEMAN NOW!

http://rocklandsoftware.net/beta.php

Advertisement

Off the top of my head, my thoughts are:

Start:

Either when the player spots an enemy that is aware of the player (in view frustrum?) or the enemy is performing an attack. You might get a slight bit of spider-sense feeling from the player if they are being attacked by slow moving projectiles.

Stop:

No hostiles aware of the player within some radius. Though you might get some wonky case where they are behind a wall but aware of the player, might depend on the AI implementation.

I've been playing Deus Ex: Human Revolution lately, and I noticed that they do a cool thing with music and combat, where the generally ambient music gets more tense as enemies get closer to you, and becomes a lot more active when they become hostile (or you fire a weapon). The more intense parts of the song will fade away as you lose the people tailing you, if you decide to flee. The thing that I thought was cool though is that it's all one continuous song/track the whole time, just more/less instruments/beats are mixed at the appropriate times.

So, something like that is an option. Having music change in relation to enemy proximity can certainly give away enemy position, though (not really a concern in DE:HR, where you can see through walls and have complete radar, with the right augs). It could be proximity related AND if the enemy is within field of view, crescendo and get intense once open combat starts. You could determine when to end the music by a check like If you're in open combat AND all aware enemies in this radius are dead, start fading to neutral music? I think some sort of transition between the different themes can help the whole thing be less jarring, as it is super weird when it's like OK sheathed my sword and music immediately changed/stopped..

Up-voted for mentioning Deus Ex: Human Revolution, which has been on my mind to play recently too! I agree, that's a good example of building up tension slowly with the music. If there are any enemies nearby you could just have a generally more 'tense' theme to announce that the area may be unsafe and then only change to the battle music when the player has located the enemy and it's clear that it's a hostile situation.


Though you might get some wonky case where they are behind a wall but aware of the player, might depend on the AI implementation.

and if the player is unaware, the combat music gives them away.

i have a feeling it can be boiled down to just two rules: starting, and stopping rules - both based on "player awareness of the enemy" and vica versa.

Norm Barrows

Rockland Software Productions

"Building PC games since 1989"

rocklandsoftware.net

PLAY CAVEMAN NOW!

http://rocklandsoftware.net/beta.php


I think some sort of transition between the different themes can help the whole thing be less jarring, as it is super weird when it's like OK sheathed my sword and music immediately changed/stopped..

dynamic soundtracks are nice, but a little beyond the manpower capabilities of this humble little one man indie game studio unfortunately.

Norm Barrows

Rockland Software Productions

"Building PC games since 1989"

rocklandsoftware.net

PLAY CAVEMAN NOW!

http://rocklandsoftware.net/beta.php


If there are any enemies nearby you could just have a generally more 'tense' theme to announce that the area may be unsafe

i consider this a design flaw in games.

the whole point of this thread is that music should NOT tip off the player as to the disposition of the badguys.

while dramatic, its also unrealistic, and therefore a hokey immersion reducer/breaker - if you actually think about it. at least in my opinion.

Norm Barrows

Rockland Software Productions

"Building PC games since 1989"

rocklandsoftware.net

PLAY CAVEMAN NOW!

http://rocklandsoftware.net/beta.php

In my game I have three types of music. First there is ambient music and secondly if an enemy is within a certain range of the player regardless if you've seen them or they've seen you the music changes to an ominous music. This is indeed to tip you off but the range is such they could really be anywhere.
Once an enemy actively engages you the music changes to combat music and when you kill them or they give up chasing you it fades back to ambient.
It's not really a design flaw because in real life you don't have dramatic music indicating the area you're in and what you're doing anyway. It would be like the family guy sketch where he wishes a guy with a tuba followed fat guys around playing a two tone musical piece... :)

Either when the player spots an enemy that is aware of the player (in view frustrum?) or the enemy is performing an attack.

if the player is aware of the bayguy, and the badguy is aware of the player - you're already in combat - unless neither has attacked.

so the player has to be aware of the badguy, and the player must be intending to attack: if (badguy_detected && weapon_drawn).

or the badguy must be aware of the player and attempt an attack: if (badguy_attacks)

and stop if: no badguys nearby are aware of player.

but you also need the inverse of the trigger conditions as well, so

stop if:

(!badguy_detected) || (badguy_detected && !player_detected && !player_wpn_drawn)

does that handle all the cases and give the desired behavior? i think it might.

combat music starts if:

1. a badguy attacks.

2. the player spots a badguy and draws their weapon to attack.

muisc stops if:

1. all badguys are dead / flee far away

2. any remaining badguys don't see player, and player is not attacking.

Norm Barrows

Rockland Software Productions

"Building PC games since 1989"

rocklandsoftware.net

PLAY CAVEMAN NOW!

http://rocklandsoftware.net/beta.php


It's not really a design flaw

like i said its a matter of opinion.

Norm Barrows

Rockland Software Productions

"Building PC games since 1989"

rocklandsoftware.net

PLAY CAVEMAN NOW!

http://rocklandsoftware.net/beta.php

This topic is closed to new replies.

Advertisement