Project Warship: Prototyping a 3D Fighting Game from Showcase to Playable Battle

    This engineering guide covers the prototype of Project Warship, a 3D fighting game. It explains how to separate showcase and battle assets, structure the game into layers with fixed-step battle logic, handle input buffering for directional special moves, design the combat state machine and three AI difficulty levels, manage the local two-player match flow, and present super moves. It closes with a performance, debugging, and acceptance checklist.

    Project Warship: Practical Notes on Prototyping a 3D Fighting Game

    In 3D fighting game prototyping, the common problem is rarely that the character select screen does not look good enough. The more frequent issue is that the showcase looks strong, but once the game enters battle, the feel, pacing, and asset consistency drop quickly. The Project Warship prototype requires two selectable characters, a rainy rooftop stage, single-player matches against three AI difficulty levels, local two-player battles, best-of-three rounds, defense, throws, jumps, dashes, floating (juggle) states, combo cancels, directional special moves, full-meter super moves with a close-up camera, and pause and match results. This article gives an engineering view, with practical module breakdowns, data structures, pseudocode, and a tuning checklist.

    1. Close the Gap Between Showcase Mode and Battle Mode First

    The character showcase usually uses high-precision models, dedicated lighting, soft camera moves, and looping idle animations. Once a battle starts, the game must handle two characters’ animations at the same time, along with collision detection, input response, effects, and UI. If the showcase and battle assets and logic are not governed by shared constraints, the typical result is a game that looks good but does not play well.

    Split each character’s assets into a showcase configuration and a battle configuration. The showcase configuration controls model precision, materials, camera, and idle presentation. The battle configuration controls skeleton scaling, collision boxes, frame data, animation events, and the performance budget. Both configurations share the character ID and appearance parameters, but they can use different LOD and material tiers.

    Before entering battle, run a resource pre-check. Confirm that the battle model, animation set, hurtboxes, move table, sound effects, and UI icons are all present. If any asset is missing, fall back to a safe configuration to avoid a black screen or a stuck state at runtime.

    2. Layered Architecture and Fixed-Step Simulation

    The prototype should be split into five layers: input, battle logic, presentation, resources, and flow. The battle logic layer advances in fixed time steps. The presentation layer handles animation blending, camera, effects, and sound. The two layers are decoupled through an event queue. This lets local two-player, AI, and pause all reuse the same logic. The pseudocode is below.

    1. type InputFrame = { dir: Vec2; buttons: BitMask; frame: int }
    2. type BattleEvent = { type: string; actorId: int; data: Map }
    3. function tickBattle(state, inputs, dt) {
    4. for each actor in state.actors:
    5. actor.input = bufferInput(inputs[actor.id], actor.buffer)
    6. actor.state = updateStateMachine(actor, actor.input, state)
    7. resolveCollision(actor, state.actors)
    8. emitEvents(actor, state.events)
    9. flushEventsToPresentation(state.events)
    10. }

    A fixed step makes frame data, combo windows, and AI reaction times reproducible. The presentation layer can interpolate rendering, which keeps the feel intact when the frame rate drops.

    3. Input Buffering and Directional Command Recognition

    The feel of a fighting game depends heavily on input tolerance. Directional special moves cannot require players to hit exact inputs on exact frames. Use input buffering, directional sequence matching, and button priority instead. Set buffer windows by move type: normal attacks use a shorter window, while special moves and dashes use a slightly longer one. Also add duplicate-press filtering and direction normalization, so diagonal jitter does not cause false matches. The pseudocode is below.

    1. function matchCommand(buffer, command) {
    2. seq = buffer.recent(command.window)
    3. normalized = normalizeDirections(seq)
    4. return subsequenceMatch(normalized, command.pattern)
    5. && buttonEdgeMatched(seq, command.button)
    6. }
    7. function bufferInput(frame, buffer, window) {
    8. buffer.push(frame)
    9. if buffer.size > window: buffer.dropOldest()
    10. return buffer.latestValid()
    11. }

    Define directional special moves in configuration data. Each move entry should include the direction sequence, button, energy cost, cancel tags, startup, active, and recovery frames, hit effects, and camera parameters. With this structure, adding a new character does not require changes to the core state machine.

    4. Combat State Machine and Core Moves

    The state machine should cover idle, movement, jump, dash, defense, hitstun, float (airborne), knockdown, throw, normal attack, special move, super move, and match result. Each state should define at least its entry conditions, exit conditions, cancel tags, invincibility frames, hitbox toggles, and animation events.

    Defense must distinguish standing block from crouching block. Throws must check range and whether the target is in a throwable state, and normal blocking should not fully counter them. Jumps and dashes need clear startup frames and landing recovery. Float states must record airborne height, hit direction, and damage scaling for each juggle hit. A combo cancel should require three conditions together: hit confirmation, a matching cancel tag, and resource cost. This prevents infinite combos.

    Damage scaling should reduce damage by combo hit count, with a minimum damage floor and a limit on how many juggle hits can follow. For collision detection, separate logic hitboxes from hurtboxes. Presentation effects should never take part in hit detection.

    5. Parameterized Design for Three AI Levels

    The AI should not be one large, hard-to-maintain set of conditional branches. Instead, build it as a parameterized state machine or behavior tree with three stages: perception, decision, and execution.

    The easy level reacts less often, chases over shorter distances, and uses fewer blocks and cancels. The standard level switches between offense and defense, jumps to avoid attacks, and performs basic combos. The hard level has better prediction, stronger resource management, and better punish ability. However, it should not cheat by reading the player’s inputs. It may predict only from visible state and historical probabilities.

    Configurable parameters include reaction delay, aggression, block probability, throw frequency, dash distance, super-move threshold, combo tolerance, and get-up choices.

    For acceptance, measure each AI level’s win rate, average match length, block success rate, and skill usage distribution. This shows whether the hard level wins through better play rather than only through stronger numbers.

    6. Local Two-Player, Best-of-Three, and Match Flow State Machine

    Local two-player requires mapping two input devices, character selection, match start, round transitions, pause, match results, and rematches. The flow layer should be independent of the battle layer.

    • Character select collects both players’ choices and locks them in.
    • The match state moves through round start, battle, round result, and next round.
    • Best-of-three counts round wins. When one player reaches two wins, the match moves to the results screen.
    • Pause freezes only the battle logic. UI animations and the settings panel keep running.

    When pause ends, reset the input buffers. Otherwise, a button pressed during pause could be misread as part of a combo input. The results screen should show round wins, key combos, maximum damage, and a rematch option, which supports both debugging and the player’s experience loop.

    7. Special Moves, Super Moves, and Close-Up Camera

    A full-meter super move requires handling resource checks, presentation state, camera switching, time scaling, and UI cues together. Split the sequence into a logic segment and a presentation segment. The logic segment handles energy deduction, invincibility frames, hit detection, and damage resolution. The presentation segment handles the camera track, character close-up, effect layers, and sound.

    The close-up should be skippable or shorter, so repeated matches do not feel slow. The camera state machine includes default follow, special-move close-up, hit shake, and results display. Time scaling only affects the presentation layer and never changes battle logic frame data. The UI must clearly show whether the energy meter is full, whether the super move is available, and whether the cancel window has closed.

    8. Performance, Debugging, and Acceptance Checklist

    The presentation layer should use object pools for effects and floating damage numbers. Animation events should drive hitbox toggles, so the game does not scan every bone on every frame.

    The debug panel should provide at least the following:

    • Input buffer visualization
    • Current state of the state machine
    • Hitbox display
    • Frame-by-frame stepping
    • Hot reload for AI parameters
    • Energy and combo counters

    The acceptance checklist includes these items:

    • Moving from character select to battle causes no missing-asset errors.
    • The behavior differences between the three AI levels are observable.
    • Local two-player inputs do not interfere with each other.
    • The best-of-three flow can be completed and restarted in full.
    • Defense, throws, jumps, dashes, floats, and combo cancels all have boundary tests.
    • Directional special moves are recognized reliably within the buffer window.
    • Super move close-ups do not block the battle logic.
    • The state stays consistent after pause and resume.
    • Memory does not keep growing during long matches.

    With data-driven configuration, fixed-step logic, input buffering, and layered presentation, the Project Warship prototype can move from “looks good on the title screen” to a complete technical loop where battle is playable, tunable, and verifiable.