Retrospective of the "Warship" Project: Key Development Points for a 3D Fighting Game Prototype

    This article reviews the development of "Warship," an internal 3D fighting game prototype built using AI coding tools. While the initial character showcase looked impressive, actual combat mechanics revealed significant engineering gaps. From an engineering perspective, it explores how to build a solid combat loop—including character selection, AI opponents, local multiplayer, best-of-three rounds, combos, cancels, and ultimate moves—from a mere presentation layer.

    “Warship” is the internal codename for a project initially developed using AI coding tools to rapidly prototype a 3D fighting game. The homepage showcased two 3D characters with good visual effects and scene atmosphere; however, actual combat revealed glaring issues in game feel, hit detection, AI behavior, camera transitions, and settlement flows. This article does not discuss specific tools or products but reviews the engineering approach: how a 3D fighting prototype featuring character selection, single-player vs. AI, local multiplayer, best-of-three rounds, blocking, throws, jumping, dashing, airborne combos, cancels, directional input specials, full-meter super moves, and cinematic cutscenes can progress from a “presentation layer” to a “combat loop.”

    1. Problem Definition: The Presentation Layer and Combat Layer Are Different Engineering Tasks

    The character showcase on the homepage is easy to make “perfect” because it primarily involves model loading, idle animations, lighting setup, and simple camera choreography. These elements are visual-centric, with few states, shallow interactions, and high fault tolerance. Issues during actual gameplay are rarely about a single model or button, but rather the lack of a stable system structure in the combat layer:

    • The showcase only requires playing animations, while combat characters need movement, turning, taking hits, blocking, airborne states, knockdowns, and recovery;
    • The homepage only needs a fixed camera, while combat requires following, locking, screen shake, and special move cutscenes;
    • Single-player vs. AI requires a difficulty-adjustable decision system, while local multiplayer requires input device allocation and fair frame-level processing;
    • Best-of-three rounds, pauses, and win/loss settlements require a complete flow state machine rather than scattered conditional checks.

    Therefore, the prototype should prioritize building a framework based on “data-driven + state machine + event bus.” Character differences are expressed through configuration, combat behavior through state transitions, and UI/effects through event subscriptions, avoiding hardcoded logic in scene scripts.

    2. Character Data and Animation State Machines

    Two independent characters should not be built as two sets of unrelated logic. It is recommended to abstract a unified character interface and consolidate differences into parameters and skill configurations:

    1. CharacterConfig {
    2. id, displayName,
    3. moveSpeed, jumpForce, dashSpeed,
    4. maxHealth, maxEnergy,
    5. hitboxSet, hurtboxSet,
    6. animations: idle, walk, jump, dash, guard, hit, down,
    7. skills: [{ inputPattern, cost, startup, active, recovery, cancelWindow }]
    8. }

    The animation state machine must cover at least idle, movement, jump, dash, block, hit, airborne, knockdown, get-up, special, and super special. The key point is decoupling the “animation state” from the “combat state”: animations handle presentation, while combat states handle hit detection. Hitboxes, hurtboxes, and throw detection boxes should be configured via data rather than scaling arbitrarily with the visual model, otherwise issues like “looks like a hit but no detection” or “hitting from a distance” will occur.

    3. Input Buffering, Combo Cancels, and Special Move Recognition

    Input processing is one of the cores of fighting game feel. It is recommended to maintain a fixed-length input queue supporting directional input recognition, button buffering, and cancel windows:

    1. InputBuffer.push(frame, direction, buttons)
    2. if buffer.match(pattern, maxWindow):
    3. tryStartSkill(pattern)
    4. onHitConfirm:
    5. if currentState.canCancelTo(nextState) and withinCancelWindow:
    6. transition(nextState)

    Blocking, throws, jumping, dashing, airborne states, and combo cancels require clear priorities and mutually exclusive rules. For example, blocking takes priority over normal attacks; throws have special detection against blocking states; airborne states only allow limited follow-ups; dashes can cancel some recovery frames but cannot loop infinitely. Directional input specials and full-meter super moves should share skill configurations, distinguished by energy resources and input patterns. Super move cutscenes should be triggered by an independent presentation controller, pausing combat logic inputs during the performance and restoring states afterward to avoid interference between camera animations and collision detection.

    4. Three-Tier AI Is Not Just Numeric Tweaks, But Strategic Layering

    Single-player vs. AI supports three tiers: Easy, Standard, and Hard, which cannot just change health or damage. A more reasonable approach is parameterizing behavioral strategies:

    • Easy: Longer reaction delays, lower decision frequency, lower block and punish probabilities, limited combo length;
    • Standard: Basic distance control, random blocking, simple combos, and will use directional input specials;
    • Hard: Shorter reaction delays, higher block and punish probabilities, more aggressive use of energy and cancel windows, while retaining readability.

    AI can use a state machine or behavior tree, outputting the same “virtual buttons” as the player to ensure fair reuse of combat logic. Difficulty parameters should be configurable, replayable, and observable for debugging.

    5. Stage, Camera, and Match Flow

    The rainy rooftop stage requires handling ground collisions, boundary limits, lighting particles, and performance budgets. The camera system should distinguish between normal follow, hit shake, special move cutscenes, and win/loss shots. The match flow is best managed by a top-level state machine: Character Selection -> Match Loading -> Round Start -> Combat -> Round End -> Best-of-Three Decision -> Win/Loss Settlement -> Pause/Return. Local multiplayer requires clear device allocation and input mapping; pausing should freeze combat logic but retain UI responses; settlements should output the winner, round score, and a restart entry point.

    6. Conclusion

    The lesson from the “Warship” project is that while AI coding tools can quickly generate presentation pages, the playability of a fighting game comes from the systematic synergy of input buffering, state machines, hitboxes, AI strategies, camera presentations, and flow management. Only by first establishing a testable combat framework and then gradually supplementing character differences, cinematic cutscenes, and difficulty parameters can two independent characters, a rainy rooftop stage, three-tier AI, local multiplayer, special combos, and a best-of-three flow form a complete experience.