If you’ve read our What Is MUGEN? intro, you know the basics — MUGEN is a free 2D fighting game engine, characters are community-made, and the whole thing powers SaltyBet’s 24/7 AI vs AI fights. But we glossed over a big question: how do these characters actually work under the hood?
Why does one character dominate S-tier with an 89% win rate while another with better-looking sprites gets stuck in P-tier? Why do some fighters win 100 matches in a row while others can’t string together 3?
The answer is in the code. Let’s break it down.
Every MUGEN character runs on a state machine. If that sounds technical, think of it like this: at any given moment, a character is in a “state” — standing, crouching, jumping, attacking, getting hit, blocking. Each state has rules about what can happen next.
State 0 is standing idle. State 10 is walking forward. State 20 is jumping. State 120 is guarding. These are universal — every MUGEN character shares the same numbered states for basic actions. But once you get into attacks, specials, and supers, creators define their own custom states (typically numbered 200 and up).
Here’s why this matters for SaltyBet: when two characters fight, the engine is constantly checking state transitions. Can this character cancel a light punch into a special move? Can they block mid-air? Can they chain attacks? All of that is defined in the character’s state logic. A character with smooth state transitions — cancels, combos, recovery frames — will mechanically outperform a character that has to wait for each animation to finish before doing anything else.
Inside each state, the character has “state controllers” — these are the instructions that tell the engine what to do. There are about 60 different state controllers in MUGEN. Some common ones:
Every move a character performs is a chain of state controllers. A dragon punch might be: play the animation, set upward velocity, activate the hitbox with specific damage and priority, check for contact, transition to a falling state. Each step is explicitly coded.
The depth here is what separates characters. A basic character might have 50 states. A complex, tournament-quality character might have 500+. More states mean more moves, more transitions, more situational responses. On SaltyBet, the characters with deep state logic tend to have answers for more situations — and that translates to higher win rates.
This is the heart of what determines SaltyBet outcomes. When two characters fight, no humans are involved. Everything comes down to how each character’s AI is programmed.
MUGEN has two AI systems:
In the character’s .cmd file, there’s a section for AI commands. These look almost identical to the input commands a human player would use, but instead of requiring joystick motions, they trigger based on conditions. The AI checks things like:
Based on these conditions, the AI “inputs” commands. The problem with command-based AI is that it’s limited — it uses the same command parsing as human input, which means it can’t react faster than the command buffer allows.
More sophisticated characters bypass the command system entirely. They use a variable (usually var(59)) as an AI flag — when the character detects it’s being controlled by the computer, it activates a completely separate set of state controllers specifically designed for AI play.
This is where things get interesting. State controller AI can:
The best MUGEN AI characters essentially have a decision tree hardcoded into their states. At every frame, they evaluate the situation and pick the optimal action. It’s not machine learning — it’s hand-crafted if/then logic — but the best creators build incredibly deep decision trees that cover hundreds of scenarios.
This is why you see such a massive gap between top-tier and bottom-tier fighters on SaltyBet. A fighter with default AI (random button mashing) has no chance against a fighter with a 500-line decision tree that knows exactly when to block, when to punish, and when to go for the kill.
Not all attacks are created equal. Every HitDef (attack definition) in MUGEN has properties that determine how effective it is:
Damage — Split into two values: immediate damage and guard damage (chip). A move might do 80 damage on hit and 8 on block. Characters with high chip damage are dangerous even when you’re blocking.
Priority — When two attacks collide on the same frame, priority determines which one wins. Priority has a level (1–7) and a type (hit, dodge, miss). A priority 7 attack beats a priority 3 attack. This is why some characters seem to “trade” favorably in every exchange.
Guard Flags — Determines how the attack can be blocked. A low attack can only be blocked crouching, an overhead can only be blocked standing, and some attacks are unblockable. Characters with good mixups between highs and lows force the opponent’s AI to guess, and not all AI is programmed to handle every situation.
Velocity on Hit — What happens to the opponent when the attack connects. Some moves send the opponent flying (wall bounces, ground bounces), setting up follow-up combos. Others keep the opponent close for pressure strings.
Pause Time — The hitstun and blockstun values. Longer hitstun means more time for combo follow-ups. Longer blockstun means more pressure on block. Characters with high blockstun moves can keep opponents locked in block strings almost indefinitely.
Hit Sparks and Sound — Purely cosmetic, but they make the fight look and feel better. The best characters have custom hit effects that match their theme.
Beyond individual moves, MUGEN characters have global balance parameters in their .cns file:
Attack (default 100) — A multiplier on all damage dealt. A character with Attack = 120 deals 20% more damage than baseline. Some boss characters push this to 150+.
Defense (default 100) — A multiplier on all damage received. Defense = 120 means the character takes 20% less damage. Combined with high health, this creates characters that are incredibly hard to take down.
Speed — Not a single stat but a combination of walk speed, jump velocity, and dash properties. Fast characters get in and out of range quickly, controlling spacing.
Health (Life) — The character’s HP pool. Standard is 1000, but characters can range anywhere from 500 to 10,000+. Boss characters with 3000+ HP can eat combos that would KO normal fighters and keep going.
Power — MUGEN’s super meter. Characters gain power by attacking and getting hit. How quickly they build meter and how much their supers cost determines how often they can use their strongest moves.
Here’s the SaltyBet angle: the characters at the top of our leaderboard tend to have some combination of high defense, strong AI decision-making, and reliable combo routes. Raw attack power matters, but a character that lands 3 combos because its AI creates the openings will outdamage a character with higher attack that can’t get in.
So what actually makes a dominant SaltyBet character? Based on what we see in the data, it usually comes down to a combination of factors:
1. Frame-perfect AI — The character reacts optimally on every frame. It blocks when it should, punishes when the opponent is open, and never wastes time with inefficient moves. Against default-AI characters, this alone is enough for a 90%+ win rate.
2. Reliable combo routes — The character has combos that work consistently from common situations. Hit confirm into launcher into air combo into knockdown into oki setup. When these sequences are coded cleanly, the character converts every opening into substantial damage.
3. Good matchup coverage — The AI handles multiple opponent types. It knows how to fight rushdown characters, zoners, grapplers, and aerial characters. Characters with narrow AI (only good against one type of opponent) end up with 60–65% win rates instead of 80%+.
4. Defensive tools — Reversals, invincible moves, and good blocking AI. Characters that can escape pressure reliably and punish overaggression survive longer and create more opportunities.
5. Balanced stats — Not necessarily the highest damage, but a sustainable combination. Enough HP to survive early pressure, enough damage to close out rounds, enough speed to control spacing.
The characters at the bottom — the perpetual P-tier residents — usually fail on #1. They’re running default AI or minimal custom AI, which means they’re essentially button-mashing against opponents who have calculated responses for every situation.
Understanding how MUGEN characters work won’t tell you who wins every fight, but it explains the patterns:
This is exactly what we built SaltyTrack to capture. Our Chrome extension shows you the data — win rates, head-to-head records, and AI-powered predictions — so you’re not guessing based on how a character looks or what chat is spamming. The code decides the fight. The data captures the code’s performance. We surface the data.
If you’re interested in going deeper:
Want to see the data behind every fight in real time? Install the SaltyTrack Chrome extension — free AI predictions, win rates, and head-to-head records right on saltybet.com. Over 570,000 matches analyzed. The code decides the fight — we tell you what the code has done before.
SaltyBet uses virtual currency only. No real money is wagered or exchanged. SaltyTrack is not affiliated with SaltyBet or Elecbyte.