Core System Design for a 3D Fighting Game: Engineering the Jump from Showcase to Combat

    This article breaks down the core system architecture behind a 3D fighting game prototype codenamed "Warship," addressing the common disconnect between character showcase presentation and actual combat feel. It covers combat specification definition, input buffering and priority, layered state machines for combos, parameterized AI difficulty tiers, local versus rules, camera readability, and a closed-loop testing strategy—all from an engineering implementation perspective with neutral design principles and illustrative code.

    In a 3D fighting game prototype codenamed “Warship,” the character showcase screen presents visually appealing models, but entering actual combat reveals issues with game feel, camera behavior, collision detection, input responsiveness, and combo feedback. This is a classic problem in fighting game development: the disconnect between the presentation layer and the combat layer. The presentation layer typically pursues high-fidelity models, complex materials, and cinematic camera angles, while the combat layer demands precise collision volumes, frame windows, input buffering, state transitions, and readability. When the two layers do not share a unified character specification, animation timing, and camera strategy, the result is a game that “looks good but doesn’t play right.” This article deconstructs the core modules from an engineering standpoint and offers neutral design methods with illustrative code snippets.

    1. Define Combat Specifications Before Visual Polish

    The first principle of fighting game development is “rules before presentation.” The character select screen may showcase two distinct fighters on a rainy rooftop stage, but before the match begins, the following must be explicitly defined: character height and collision dimensions, hurtbox and hitbox sizes, movement speed, jump initial velocity and gravity, dash duration in frames, guard stance properties, throw range, juggle height and tech recovery rules, combo cancel windows, energy meter cap, and super move costs.

    A recommended approach is to separate character data from presentation assets: presentation resources handle models, animations, effects, and audio; combat data governs states, hit detection, frame windows, and resources. The two are linked through stable character IDs and animation IDs, avoiding hardcoded logic scattered across animation events.

    An illustrative configuration might look like this:

    1. {
    2. "characterId": "fighter_a",
    3. "collision": {"height": 1.8, "radius": 0.45},
    4. "states": {
    5. "idle": {"transitions": ["walk", "dash", "jump", "guard", "attack_light"]},
    6. "attack_light": {"cancelWindow": 6, "cancelTags": ["special", "super"]},
    7. "guard": {"hold": true, "chipRatio": 0.1},
    8. "hitstun": {"canTech": true}
    9. }
    10. }

    The fields above are merely illustrative; actual values must be tuned through playtesting. The key is to keep the configuration readable, auditable, and regression-testable, rather than leaving hit detection entirely to animation curves.

    2. Input System: Buffering, Priority, and Consistency

    Local versus play and single-player versus AI must share the same input abstraction layer. Physical button presses should be mapped to logical actions: left, right, up, down, light attack, heavy attack, guard, throw, dash, super move input, etc. Each logical action enters a fixed-length input buffer queue consumed on a per-frame basis. Directional special move inputs require a “direction sequence recognizer”—for example, matching a forward, down, forward sequence within a frame window, while also handling simultaneous presses, early inputs, and reverse inputs.

    Illustrative pseudocode:

    1. buffer.push(action, frame)
    2. if matcher.match(buffer, ["forward","down","forward"], window=12):
    3. requestState("special")
    4. if buffer.has("guard", hold=true):
    5. tryEnterGuard()

    The input system must guarantee three things: fixed timestep updates to avoid frame-rate-dependent inconsistency; clear input priority so that guard, throw, special, and super moves resolve deterministically on conflict; and debug visualization showing the buffer queue, match results, and state transition reasons. Many instances of “poor game feel” stem not from animation issues but from swallowed inputs, overly narrow windows, or state transitions being overwritten by legacy logic.

    3. Combat State Machine and Combo Canceling

    Character behavior is best modeled as a hierarchical state machine with separate layers: ground movement, air, hitstun, guard, attack, and cinematic/performance layers. State transitions must satisfy a condition table; arbitrary jumps are prohibited. An attack state contains three phases: startup, active frames, and recovery. Cancel windows only open after a hit is confirmed or the move is blocked, and they are constrained by cancel tags. Juggle combos require tracking juggle height, hitstun decay, gravity, and landing protection to prevent infinite combos. Throws need independent detection logic to handle whiffs, tech throws, anti-air throws, and corner interactions.

    Illustrative cancellation logic:

    1. function canCancel(current, next, elapsed, hitConfirmed):
    2. if not hitConfirmed: return false
    3. if elapsed > current.cancelWindow: return false
    4. return current.cancelTags.contains(next.tag)

    The core of combo canceling is not “allow more actions” but “use finite windows to create a learnable, counterable rhythm.” Cancel rules should be data-driven, and each character should have automated test cases for minimal combos, standard combos, and loops that are explicitly disabled.

    4. AI Difficulty Tiers: Parameterized, Not Script-Stacked

    Easy, normal, and hard AI should not be three completely separate logic sets. Instead, they should share perception, decision, and execution layers, with difficulty differences driven by parameters. The perception layer handles distance, facing, opponent state, meter, and self-hitstun. The decision layer chooses between offense, defense, movement, throws, specials, and resource management. The execution layer converts decisions into input sequences. Difficulty parameters can include reaction frame delay, guard probability, throw-tech probability, combo success rate, input noise, resource usage thresholds, and offensive pressure tendency.

    Illustrative configuration:

    1. {
    2. "easy": {"reactionFrames": 18, "guardRate": 0.35, "comboRate": 0.25},
    3. "normal": {"reactionFrames": 12, "guardRate": 0.6, "comboRate": 0.55},
    4. "hard": {"reactionFrames": 7, "guardRate": 0.82, "comboRate": 0.8}
    5. }

    These values are examples only; they must be tuned with data from actual play sessions. Hard AI should prioritize “readable pressure and counterplay” over perfect, zero-delay defense—otherwise players will perceive the game as unfair.

    5. Local Versus, Round Rules, and Results

    Local versus mode requires device mapping, shared-screen camera handling, pause mutual exclusion, and round resets. A best-of-three format is best managed by a round state machine with these states: ready, fighting, round end, intermission, and match end. Each round resets positions, resources, juggle counters, and combo counts. Pausing should freeze only the logic frame, not menu input. The results screen displays the winner, round score, key stats, and a rematch option. Win/loss detection must cover time-out, zero health, double K.O., and edge cases.

    6. Camera, Cutscenes, and Readability

    Full-meter super moves and dramatic camera angles should sit in a controllable performance layer. This layer must not disrupt the determinism of combat logic. The recommended approach is for the performance layer to subscribe to combat events, play cameras and effects at safe moments, and support skipping or quality degradation. The rainy rooftop stage needs attention to ground reflection, rain-obscured visibility, and character silhouette contrast so that special effects do not mask attack hitboxes. Camera distance should maintain consistent character scale between the showcase screen and actual combat to reduce the jarring effect of characters appearing smaller and moves being harder to read once the fight begins.

    7. Testing and Tuning Loop

    Establish a feedback loop with frame data tables, input recording/replay, AI battle sampling, and automated regression tests. After every character spec change, run fixed input sequences to verify combos, guard behavior, throws, and round resolution. On the performance side, monitor fixed timestep behavior, object pooling, effect LOD, and on-screen resource budgets. The ultimate goal is not feature stacking but a consistent, testable, extensible engineering loop that ties together character selection, combat rules, AI difficulty, local versus, and cinematic systems.