Music synced attacks.
I'm designing my game right now and had an idea for making attacks deal extra damage if you hit a combo to the music (which will be heavy metal). Like if the really loud guitar part of the song comes, and at that time you hit with a 5 hit combo or a charge attack it would either give you higher score for that kill, or the attack would deal more damage. Then "Music bonus!" would pop up on screen to show what you did. It would encourage people to fight to the music, wich would make it possible to control combat through music. Does this sound like a good idea? Or a bad one?
Sounds like a pretty excellent idea actually, it keeps in a bit of rhythm without making it tediously necessary. As long as you get all the timing on everything right, and perhaps sync up the enemies to the music (which would make blocking attacks way cooler and seem less anticlimactic) it would be super awesome.
I am no expert in audio by any means.
I would imagine this would require some kind of signal analyzer where you would monitor a particular frequency range, maybe that of a guitar or bass drum, then when a particular frequency hits a certain amplitude you would flag up a multiplier. I dont know if this is waffle or if there is some truth in it but I hope that helps!
I would imagine this would require some kind of signal analyzer where you would monitor a particular frequency range, maybe that of a guitar or bass drum, then when a particular frequency hits a certain amplitude you would flag up a multiplier. I dont know if this is waffle or if there is some truth in it but I hope that helps!
Most good ideas have been done already - this included, done in Mother 3 :P
http://cruiseelroy.net/2009/01/mother-3-battle-music/
http://cruiseelroy.net/2009/01/mother-3-battle-music/
You haven't heard of Rez? It's a rail shooter where every event in the game happens in time with the music. Enemy spawns, locking on and shooting all go in time with the music. It's quite an experience.
If you make it intuitive for attacks to land in time with the music, it can help the experience... of course if the music is one of the central aspects of the game. :)
If you make it intuitive for attacks to land in time with the music, it can help the experience... of course if the music is one of the central aspects of the game. :)
Sounds like a good idea, and even if it has been done before, I am sure it won't be exactly like your game. However, I actually wanted to do something like this before, and it can be quite hard to code. But, as the other poster brought up, I did not use any kind of sound analyzer. I just tried to work out the timing myself, which almost drove me crazy with all of the trial and error.
What I did come up with, though, is probably one of the easier ways of doing it if you are not using a music analyzer: I created a separate program that could record button presses, play them back and then spit out a text file with press timings in milliseconds. So I would play the song, and try to hit a few keys along with the musical beat. Then I would play back what I just pressed, with lights lighting up for each button press. When I was satisfied with it, I would hit export to get the timings to work with. I wish I still had it, but that was a reformat ago, and I figured I would not use it again because of all the frustration. It is a pretty simple program to make, but it is still a lot of trial and error.
What I did come up with, though, is probably one of the easier ways of doing it if you are not using a music analyzer: I created a separate program that could record button presses, play them back and then spit out a text file with press timings in milliseconds. So I would play the song, and try to hit a few keys along with the musical beat. Then I would play back what I just pressed, with lights lighting up for each button press. When I was satisfied with it, I would hit export to get the timings to work with. I wish I still had it, but that was a reformat ago, and I figured I would not use it again because of all the frustration. It is a pretty simple program to make, but it is still a lot of trial and error.
It sounds like it could be pretty complicated to program too.
What if the audio lags or the main thread lags?
You'd have to make sure and keep time in sync with the music
might be difficult, havent really tried to do anything like that before though...
What if the audio lags or the main thread lags?
You'd have to make sure and keep time in sync with the music
might be difficult, havent really tried to do anything like that before though...
Well, if you have a music program like garage band, or reason, or anything like that, you should be able to perfectly time the notes of the music (instead of relying on human timing on a keyboard). Once the music has perfect note timing, you can know for sure that every action has to sync to the music's tempo, say 120 beats per minute. You mark the start time of the music and count BPM and if the player hits in sync to that you know his timing is synced with the music's tempo.
To figure out if the hit was in sync with a significant beat, such as a bass drum beat, or the start of a killer guitar solo, you would probably do best with a second file that records which beats are significant, or gives a "significance" value to each beat in the song.
Say the song is 500 beats long (4 minutes) then you might have 500 indexes each with a value that represents how significant that beat is to the song. You might also try automatically creating such a table using music analyzers and keying it to volume and frequency, but you can tune it by hand too, and probably more intelligently. Just mark what beats need what values, and any beats you didn't mark, give a zero to.
To figure out if the hit was in sync with a significant beat, such as a bass drum beat, or the start of a killer guitar solo, you would probably do best with a second file that records which beats are significant, or gives a "significance" value to each beat in the song.
Say the song is 500 beats long (4 minutes) then you might have 500 indexes each with a value that represents how significant that beat is to the song. You might also try automatically creating such a table using music analyzers and keying it to volume and frequency, but you can tune it by hand too, and probably more intelligently. Just mark what beats need what values, and any beats you didn't mark, give a zero to.
This is a neat idea, and I think there's a lot that can be done with it. Judging by the original post, it seems like you're using the music more to designate certain blocks of time as bonused, a sort of musical "terrain" effect. Wailing guitars? Time to flip out and kill some dudes. Single track of deep, throbbing bass rising to a crescendo? Boost to charging special attacks. Soothing string interlude? Time to heal up.
If you're actually going for the rythym angle, matching blows to the beat of the music, that's a bit trickier. Every time I watch The Princess Bride, and see the ">clifftop duel (fight starts at 2:45), I think how rad it would be, but the mechanics never seem to work out well in my head unless the player already knows the song really well and can anticipate the next few measures of it.
After all, any fencer, boxer or tennis player can tell you that the trick to beating your adversary is to wait for him to sink into a rythym, and then break it with your attack. Rewarding a player for rythmic (and thus predictable) moves turns a fight into a dance, which is good video gaming, but might not be very well received, especially in some kind of versus mode.
If you're actually going for the rythym angle, matching blows to the beat of the music, that's a bit trickier. Every time I watch The Princess Bride, and see the ">clifftop duel (fight starts at 2:45), I think how rad it would be, but the mechanics never seem to work out well in my head unless the player already knows the song really well and can anticipate the next few measures of it.
After all, any fencer, boxer or tennis player can tell you that the trick to beating your adversary is to wait for him to sink into a rythym, and then break it with your attack. Rewarding a player for rythmic (and thus predictable) moves turns a fight into a dance, which is good video gaming, but might not be very well received, especially in some kind of versus mode.
There is a variant I thought up.
In Prince of Persia: Rival Swords the music is switched when you are in a fight from when you are just walking through the level, which is actually quite common. But maybe during boss battles the boss could do a huge attack at the beginning of a guitar solo, then it would be left open and you would then be able to hit it with your attack. Which would be animated differently depending on the boss. Such as when you're on a bridge and you're hitting the giant boss with ranged weapons, when it moves in and attacks (at the start or right before the guitar solo) it will be open to hits when the solo is on. I think something like this was done in The Legend of Zelda: Twilight Princess.
In Prince of Persia: Rival Swords the music is switched when you are in a fight from when you are just walking through the level, which is actually quite common. But maybe during boss battles the boss could do a huge attack at the beginning of a guitar solo, then it would be left open and you would then be able to hit it with your attack. Which would be animated differently depending on the boss. Such as when you're on a bridge and you're hitting the giant boss with ranged weapons, when it moves in and attacks (at the start or right before the guitar solo) it will be open to hits when the solo is on. I think something like this was done in The Legend of Zelda: Twilight Princess.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement