Command

From mugen-net
Revision as of 10:44, 24 January 2020 by 70.76.54.58 (talk) (→‎Command Parser Priority)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

A command is a sequence of player inputs, typically used to perform special moves.

M.U.G.E.N[edit]

M.U.G.E.N provides an implementation for a command parser as well as a buffer. However, both of these have problems.

Command Parser[edit]

M.U.G.E.N's command parser has a bug where non-cardinal directions (DF, UB, DB, etc.) will be counted as valid if the individual elements are mashed out[1]. As such, any buffering systems that rely on M.U.G.E.N's command parser for anything other than buttons and cardinal directions (such as Tiny Buffering) will also suffer from this same problem. Deep Buffering solves this issue[2].

Direction charging (which is used for moves such as Guile's Flash Kick and Sonic Boom) is also bugged. In M.U.G.E.N, there is only one variable for the hold timer, regardless of directions. Using Sonic Boom as an example:

[Command]
name = "CB,F,x"
command = ~60$B, F, x
time = 12

Because only one variable is used (rather than one for each direction), this means a player can hold forward for 60 ticks, then quickly input B,F,x to complete the move. For this reason, many developers implement charge timers themselves.

Like Tiny Buffering, a time window encompassing the entire command is used to determine when the entire command sequence input by the player is valid. As long as the entire sequence is completed within this time window, the command is considered valid. This is similar to some commercial implementations. This is defined by the `time` parameter in the command definition.

Command Buffering[edit]

M.U.G.E.N's command buffering is limited, but it does do what is expected. When a command is input, it is considered valid for the number of ticks specified in the buffer.time parameter of the command. After that, the command is no longer considered active.

Syntax[edit]

M.U.G.E.N allows up to 128 unique commands to be defined. The M.U.G.E.N command syntax is very simple and consists of the following tokens:

  • Directions: U,UB,B,DB,D,DF,F,UF
  • Buttons: x,y,z,a,b,c,s
  • Special tokens: /, ~, $, +, >

The format for a command is as follows:

[Command]
name = some_name
command = the_command
time = time (optional)
buffer.time = time (optional)

Strings in commands (both for the name and the command definition) are case-sensitive. This means that "QCB_a" is not the same as "Qcb_a," and having both means that two separate commands are created. Additionally, B (back) is not the same as b (B button).

Special Tokens[edit]

/[edit]

The / token indicates that the input that immediately follows must be held.

~[edit]

The ~ token indicates that the input that immediately follows must be released. This is typically used for Negative Edge commands.

$[edit]

The $ token has two uses: defining 4-way directions, and charge motions. A $ followed by a direction indicates that any input that contains that direction will be interpreted as valid. So for instance, $D is valid when the player inputs D, DF, DB, and indeed, DU (even though this is not technically possible on a joystick, it can be done on hitboxes).

+[edit]

The + token indicates that two or more inputs must be active at the same time in order for it to register as valid. a+b for instance indicates that a and b must both be pressed at the same time. This, however, does not work for multiple button negative edge (release) commands, so ~a+~b will not work and requires additional logic, usually implemented in a custom buffering system.

Corrections[edit]

The M.U.G.E.N CMD documentation makes the following suggestion:

It is recommended that for most "motion" commads, eg. quarter-circle-fwd, you start off with a "release direction". This makes the command easier to do.

However, this is incorrect, at least for Capcom games. In Capcom games, the first direction is always a hold. This is done so that commands input while walking will still work.

Input Lag[edit]

Nearly every commercial game has some input lag (typically between 2-6 frames; 4 frames or below is generally considered acceptable). Input lag refers to the additional time that passes before a command executes the next move. Input lag is measured either in frames or in milliseconds (with 16.67ms being equal to 1 frame in a game running at 60FPS). M.U.G.E.N natively has 2 frames of input lag, although the addition of a custom buffering system can increase this.

Negative Edge[edit]

Negative Edge refers to a mechanic in Capcom games where the final input for a special command can be a press or release. For example, in Street Fighter II, Ryu can execute a Hadouken when the player inputs either /D,DF,F,x or /D,DF,F,~x. This was done in order to make executing special commands easier, though when combined with the fact that each basic move allows the user to "cancel" their basic into a special anytime before the first attack box is displayed, this results in the unintentional side effect of having "cancel combos," often referred to simply as "cancels." While Negative Edge is not required for cancels to work, it does make them easier for the player to execute.

Later games which have commands requiring two or more button presses to work (such as the ES and EX commands in the Vampire series and EX commands in the Street Fighter III series) can be activated when either of the buttons is pressed or released. Thus, /D,DF,F,x+y, /D,DF,F,~x+y, /D,DF,F,x+~y, and /D,DF,F,~x+~y will all lead to the same result. However, M.U.G.E.N's command parser does not interpret these release variations, so the developer must implement multiple button Negative Edge themselves. Deep Buffering and Drunk-Fu both handle this scenario.

While it is typically in Capcom fighting games (with the exception of Marvel vs. Capcom 3 and Ultimate Marvel vs. Capcom 3), the Guilty Gear games also utilize Negative Edge.

Command Parser Priority[edit]

MUGEN's built in command parser registers holds before presses. For directional inputs, this is not an issue, as most fighting games at the time were designed for commercial joysticks. This logic was applied incorrectly to button presses, however, resulting in hold commands for buttons always taking priority over press commands, and causing issues such as double button press commands to be up to 2 frames behind in the engine's command detection.

Combos[edit]

A combo is defined as a series of moves that are executed one after the other to damage the opponent. For a combo to be possible, the opponent must not regain control from the previous hit. The hit counter is typically a good indicator of whether or not a series of moves combo into each other.

There are three main types of combos: links, chains, and target combos.

Links[edit]

A link occurs when a move executed after the attacker returns to a neutral (non-attacking) state hits the opponent while they have no control. This is the main type of combo in the Street Fighter games, though they exist in nearly every fighting game.

Chains[edit]

A chain refers to a move that has been executed during a hitpause leads to a successful combo. In a chain, the subsequent move is input by the player during the hitpause and is usually executed immediately after the attacker's hitpause ends. This results in quick, easy combos. This is the main combo mechanism in the Vampire and Marvel games. Chains are typically executed from weakest attack to strongest attacks, from punches to kicks. The most prevalent type of chain is known as the Hunter chain, and executes from LP > LK > MP > MK > HP > HK. The Marvel series typically only allows one of each type (Light, Medium, Heavy) to chain.

Target Combos[edit]

A target combo refers to a special, specific sequence of moves that can be input in the same manner as a chain. The difference is that only certain moves can set up a chain combo. For example, Yun's s.LP > s.LK > s.MP in SF3 is a target combo.

See Also[edit]