Monday, March 28, 2011

The Art of War II: Advanced Combat Mechanics

The deeper I take this topic the more difficult it is to avoid the blog descending into a verbatim Prima strategy guide about Street Fighter IV or Devil May Cry. It's important for me to steer this feature away from being about a specific game, or franchise, or even genre; my goal is to keep it general enough to still be an informative guide to creating and improving videogame combat systems. You'll also remember in Part 1 I made it clear these notes are mostly about the topic of third person melee-orientated combat with AI enemies. Player versus player fighting games obviously require considerable extra focus on balancing both sides of the scale, whereas one-sided single player systems are about ensuring the enjoyment of just one side of the fisticuffs.


Single Input Expansion: Charge and Negative Edge
As I already said, I believe the secret to good combat lies in providing the player options, and it's important to find ways to do this even in simpler systems. Unfortunately, combat systems usually have to fit inside control systems which are already busy with the mechanics of other aspects of the game, such as platforming or shooting. When you have even two buttons, it's pretty easy to come up with a decent move list (light, light, heavy or light, heavy, light etc.) but if you are left with just a single combat button to play with, most of the obvious doors are closed. Ideally you should look for a modifier that when held or active essentially remaps the controls (a hard lock-on button is perfect) but it can be very messy to take the ability to activate combat mode away from the player and rely instead on enemy proximity or special scenes. Also, be careful how you remap the controls, It has to be intuitive, changes such as turning a jump into a punch clash with a players learned instincts.


Assuming you just have one button and no hard-lock to bring in direction inputs though, you still have “Charge” and “Negative Edge” mechanics.
Charge: This is pretty straight forward; traditional attacks are performed by tapping the button. If the player instead holds the button in for a short time before releasing, it can be used to either power up the basic attack, or to perform a completely different move. This is the basis of the “Flourish” mechanic seen in Fable II and the “Tame” property of the hand-to-hand weapons in Devil May Cry.
Negative Edge: This is the lack of anything being pressed counting as an input within the context of a combo string. For example: attack, attack, gap, attack. The player stops pressing attack briefly, and then starts doing so again, which takes the combo in a different direction as if they'd pressed another button. Who says you can't get something for nothing?

Sound the Alarm: Telegraphing and Audio Visual Cues
An important compliment to the defense systems talked about in Part 1 is that the player has a moments warning before an incoming attack, so they know when to initiate a block, counter or evasive move. This should be worked into the enemy AI, and can be audio, visual, or both. Once these cues are in place, it's less necessary for the enemy to repeat a pattern, as the player has been given the tools to predict them outside of their adhering to a precise routine.


Visual: This can be as simple as an enemy glowing a particular colour, raising a poised claw, or adopting a pounce stance. It is a few moments (or frames) that precede the part of the attack which actually hurts. Sometimes designers cheat and have a universal cue for all enemies attached to the player, such as a tingly spider sense around the protagonists head, or a button prompt that pops up somewhere on screen.
Audio: Cast your mind back over any boss AI pattern you have ever memorized and you'll find that those annoying things they kept saying or noises they kept making were actually paired with a specific attack. Essentially the enemy sounds off with a particular noise or phrase immediately before the attack, and the player can learn that this audio cue is attached to a particular action the enemy is about to perform and prepare accordingly. This is essential for any enemies who might come at the player from off-screen, where visual cues don't do anyone any good.

Frame for Frame: Mathematics of Advantage
If you continue researching and analyzing combat mechanics inevitably you will stumble into frame data. Even in 3D, each attack and move the player performs comes down to moments and seconds, to the frames. The frames of any attack can be firstly divided into 3 clear sections:
Start Up: How long the player character takes to get around to actually performing the attack. In terms of enemy AI, the start-up frames are essentially the visual cue that telegraphs the attack about to become active. Technically though, these are an actual part of the move/attack being performed eg. drawing back the hand
Active: This is the part of the attack which does damage, the business end of the move eg. the punch
Recovery: How long after the active part of the attack before the move is considered finished and the player can perform another action such as movement or another attack eg. retracting the arm after the impact


When an enemy is caught in the active frames of the attack, they enter what is known as Hit Stun; another vital mechanic in combat systems. Hit Stun is the amount of frames the enemy spends reacting to the attack, and thus the amount of time before they are free to move or attempt an attack of their own. In combo-based games and the fighting games that inspire them, the key to linking together moves into combos is ensuring enough frames advantage between the recovery time of the move they performed and the hit stun their enemy has entered. For example if the enemy goes into 8 frames of hit stun and the players move has 5 recovery frames, then they have a hit advantage of 3 frames in which to perform another attack and keep the combo going. Moves with a start-up longer than 3 would provide the enemy time to leave hit stun, recover and block.

Often combat systems feature various “stun states” which dictate both the length of hit stun and the position of the enemy following the attack; for example grounded, rising, crumpling, stumbling, aerial... which also influences what attacks can be used to follow up different attacks. I don't wish to delve into the topic here, but it comes down to the “Hit Box”, the hostile area created during the active frames of an attack, and the part of the enemy that must be inside that area to count as them being hit. On a basic level the designer has to be on the look-out to ensure eventually the recovery and start-up outnumbers the hit-stun, or the hit box becomes out of range due to the stun state. If not, you have a curly mustache on your hands. (Infinite combo)


Commitment Issues: Canceling
It can be very frustrating for players to become trapped in an attack once they perform the input. A lot can change during the start, active and recovery frames of a move, so to become locked-in through all stages of it often leaves the player open to unexpected reprisals. “Canceling” is therefore an advanced mechanic that allows the player to pull out of an attack before it finishes. It is important to maintain a risk/reward ratio (constantly central to good games design) by limiting the things players can cancel with and when. Usually players can only cancel during certain stages of a move; during the start and/or recovery frames for example, and often only with specific actions such as a defensive block/evade which allow the player to avoid damage, but not perform a new move immediately.

Nonetheless you can encourage tactical links by allowing certain moves to be canceled into other moves; skilled players will search out and discover these possibilities and use them to advantage when coming up with new combos. Taking into account the above notes though, skipping a moves recovery frames obviously does crazy things with the start-up/recovery/hit-stun math. On the bright side, canceling into other moves is usually difficult to perform due to the speed and precision needed, so in a way it “balances itself” or acts as a high-tier reward.


Commitment Issues II: Dial-a-combo
There is a lot of debate as to what the term “dial-a-combo” actually means. In some groups, they think it means any game with pre-determined combo chains, such as the aforementioned “light, light, heavy” input. I think this is too wide and pointless a definition, and prefer the terms other meaning. If you're playing a game and press a button or provide an input, the character of course performs the relevant action. But in a combo which requires multiple presses, what window does it consider the input pressed a second time or third time or fourth time? Dial-a-combo is whenever the game queues your inputs up, so if you press the attack button three times quickly, the player character essentially has three inputs dialed or “queued”, and the results play out on screen despite the player pressing nothing else. This has the same problems of systems without cancelling; the player becomes locked in whatever inputs they have lined up, and cannot react in the moment until those inputs play out. Thus, a dial-a-combo combat system with few or no cancel-able moves is an extremely strict and claustrophobic system, prone to trapping the player in actions for periods of time, during which they are unable to change tactics on-the-fly or react quickly to a changed condition or incoming threat.

A non-dial a combo system calls upon the rules of frame data once again. The same as how certain frames or stages of a move might be open to canceling, certain frames or stages of a move are open to a new input being considered. Usually, it's during the recovery frames that an attack opens to the players next input. So if the player was to press a button several times during the active frames, these inputs would be ignored, rather than queued, which is actually better as it requires and allows more precise performance of the games different inputs.


Finish Him: Grapples, Grabs and Throws
A last thing I wanted to cover in this part of the combat mechanics series is the recent fascination with finishing moves in the form of “grabs” or “grapples”. Throws are a classic part of the rock, paper, scissors tactics of fighting games; they essentially ignore a block stance, so that merely the act of effective blocking doesn't make players immune to attack. God of War splash landed into the action genre with a new take on the grab/throw however, by turning them into the opportunity for contextual finishing moves. "Quick-time-events" in other words; pre-canned animations/movies requiring little or no input from players. This is a symptom of a larger condition affecting the medium, in fact it's the topic of my Masters dissertation "Blockbuster versus mechanical design", the process and conclusions of which I might streamline and post up in the near future.

Within the immediate context however, I suppose the message I want to convey is that pre-canned flashy finishers probably shouldn't be avoided whole-sale, but relying on their spectacle to carry a combat system will dilute the players own interaction with the game and combat. Refer to the opening of Part 1; inevitably a large part of combat is pre-canned flash, but the designer has to consider what the player puts into the equation. Don't dumb the players role down to slapping enemies around until they are ripe for a button prompt finisher that the game handles for you. In fact, I'd like to see more games try and work these grabs into links, so that they aren't an inevitable C note to a combo chain, but that's for future games to consider.

Speaking of C notes, that's the end of Part II. I'm not actually sure if I have enough meaningful non-bespoke material left for a Part III, sans super amour, unique move properties and air game, but I'll have to leave that in the air for now. (Wey)
Hope some people out there found this informative! And yes, the "pro" club do actually have the ability to count frames. Or at least register key frame changes. They must see 1's and 0's instead of tris and pixels, like in The Matrix. Thanks for reading!

-Steve

3 comments:

  1. Sweet Steve! I learnt a lot from that post. Things such as the audio/visual cues seem obvious to me but then when your talking about the dial--a-combo, its something that I've never even considered.

    I definitely think there's a more effective way for the grapples to be implemented as it kinda of feels like a cheat move when you have no control over the pre-set animation and it does it all for you.

    Good stuff :)

    ReplyDelete
  2. No probs Pete! It was really satisfying delving into one of my favorite topics like this, particuarly with the fresh angle of streamlining the topic down into its core principles.

    Gonna take a break from the combat next post I think, but I may come back to it at a later time ;)

    ReplyDelete
  3. Hey, great sequel to the first article; as Pete mentioned, you named a lot of things gamers understand, but can't really name. It was great!

    Hopefully, you'll be back for the third part. Would love to learn more about it!

    ReplyDelete

Just tell me I'm great. I get a kick out of that.