Tweaking Animation Speeds

Hey there, I’m currently working through a few game prototype ideas.

I had an idea for a character that would move in time with a music’s BPM. I figure this’d be easy if you made all of the animations last a multiple of 60 frames. So a walk cycle might be 120 frames long, a punch animation 30 frames long etc. Moreover, I think it’d be fun to, using 60 frames as a “full beat”, using divisions of that 60 frames as keyframes. So if there’s a flurry of punches, you could have the punch be fully extended at frames 15, 30, and 45 to effectively create a musical quaver.

I was thinking if there was a way to mess with the animation speed with blueprints, you could then adjust the animation speed to react to a bpm dynamically. So using 120bpm as a baseline, if the bpm was 130bpm, you’d increase all animation speeds by 8.33%. In terms of gameplay, I could use the music as an interactive element. Perhaps the player has powerups to increase the speed or decrease it depending on how fast or slow they want to move. Tricky platforming would demand a contemplative 60bpm waltz, whereas a chase sequence would demand the fastest deathmetal 180bpm anthem possible.

Do you think this it’s feasible to sort of adjust all animations en masse like that? Is there an easier solution I haven’t thought of? Obviously there would need to be different animations for extremely low or extremely high bpms otherwise it’d just look like the character was moving in slow motion or fast forward.

Sure the wiring is simple enough, you figure out the math input, and build a blend space using matched animations. With the math figured out you could then add the blend space in the animgraph make the scale pin visible and tie in your procedural input.

As well

Since a blend space is nothing more that a 1 or 2 dimensional array you can change the animations based on high and low extremes by adding it as a percentage point with in the graph. (obviously just changing the speed would look strange;) )