Shipboard 3D Combat Simulation: Architecture Design and Practical Implementation
This article breaks down the engineering design of a shipboard 3D combat simulation, from goals and layered architecture to rules, state machines, and acceptance criteria. It explains why an entry screen with polished characters often breaks down once a match becomes interactive, and shows how to unify entity definitions across rendering, collision, and hit detection. Readers will find guidance on a fixed-timestep simulation layer, data-driven character configs, mutually exclusive body states, cancel windows, difficulty tiers that change decisions rather than hitboxes, local two-player input mapping, best-of-three rules, stage and camera handling, semantic event logging, and a checklist-based regression approach.
Shipboard 3D combat simulation looks like graphics and controls on the surface. Underneath, it is a constrained real-time state system. Many prototypes can put two complete characters with stable lighting on the entry screen, but the moment a match becomes interactive, collision, hit reactions, camera behavior, and win/loss determination all start to drift. The problem is usually not that “the models aren’t polished enough.” It is that the presentation assets and the rules engine do not share the same entity definition. Below, this kind of system is laid out again from an engineering perspective: goals, architecture, rules, and acceptance.
Define what the system is actually for
The reasonable goal for this kind of simulation is not to clone a commercial fighting product. It is to train operators to judge distance, timing, resources, and risk inside a confined deck or compartment space. Typical capabilities include:
- Single-player against configurable opponent strategies, with easy, standard, and hard tiers
- Local two-player versus on one machine
- Best-of-three rounds
- An action layer covering defense, throws, jumps, dashes, juggle states, and combo cancels
- A resource layer with directional-input special moves and a full-energy super move, plus a short close-up on key hits
- A flow layer with pause and match settlement
All of these capabilities can sit on the ordinary mechanics of a general-purpose game or simulation engine: entity components, animation state machines, physics or kinematic collision, input buffering, and a finite state machine for the match. There is no need to bind to any vendor’s proprietary interface. If recordings, replays, and configuration later move to object storage, or if match events are shipped to logging and monitoring, the same holds: design against generic capabilities such as object storage, message queues, logging services, and monitoring with alerting, rather than hard-coding the architecture to one cloud product’s specific instance types or parameters.
Why the presentation layer and the playable layer split
The entry screen typically loads only an idle animation, a small skeleton, and a fixed camera. The frame budget is generous, and art acceptance only looks at stills and slow turntables. Once a match starts, the same character must simultaneously carry hurtboxes, hitboxes, root motion, camera occupancy, and local or networked input prediction. If character data lives only in a scene file while the rules live in a separate set of hard-coded branches, you get the classic symptom: “it looks like the same character, but the collision behaves like a different one.”
Stages such as a rainy rooftop or a flight deck amplify the problem. Wet specular highlights, volumetric fog, and dynamic rain consume lighting and post-processing budget, while tight movement space demands collision meshes more conservative than the render meshes. The correct approach is to split the data three ways: a render mesh for appearance, a simplified collision mesh for standing and boundaries, and hit volumes that exist only during a move’s active frames. All three are linked by the same entity identifier and the same attachment-point naming scheme, and hard-coded world coordinates are forbidden in match scripts.
Overall architecture
A four-layer split is recommended, with layers communicating only through explicit events and read-only snapshots.
The presentation layer owns models, animation, effects, UI, and camera. It never decides the winner; it only consumes “which clip to play, who the camera cuts to, what the health and energy displays show.”
The simulation layer advances on a fixed timestep, recommended to be decoupled from the render frame — for example, a stable simulation step with interpolated rendering. It owns position, velocity, facing, hitstun, invulnerability frames, energy, and round count.
The rules layer describes the match state machine: select, load, round intro, fighting, pause, round end, match end. The rules layer can veto transitions proposed by the simulation layer, such as rejecting a super move when energy is insufficient.
The input layer translates bindings into semantic actions: forward, back, up, down, punch, kick, guard, dash. Local two-player is just two input devices mapped to the same semantics; it does not require a second rules implementation.
A schematic match flow does not need to depend on any specific engine API:
Match: Select -> Load -> RoundIntro -> Fighting -> RoundEnd -> (next round | MatchEnd)Fighting: Pause can be entered; on resume, do not reset the RNG seed or the remaining timeRoundEnd: lock input, play the settlement, then decide whether to start the next round
Characters as data, not scene props
Two independent characters should be two configuration files, not two objects placed by hand into the level. Each configuration contains at minimum: skeleton and animation set, hurt and hit attachment points, weight or knockback weight, movement speed, jump and dash parameters, move table, and energy gain coefficient. The stage only references “spawn points” and “boundary volumes.” This way, swapping characters or stages does not duplicate move logic.
Character differences belong in numbers and move tables, not in several same-named scripts. For example, one character leans toward movement and spacing, another toward close range and throws; the difference shows up in startup frames, throw range, and energy recovery, not in name-based branches in code. A character name can serve purely as a display name for localization and must not be used as a logic key.
Action state machine and combo cancels
Broken feel almost always comes from state transitions without priority. Converge body states into a finite set: standing, crouching, walking, dashing, jumping (rising, apex, falling), attacking, guarding, thrown, juggled, knocked down, waking up. Each state declares whether it can be interrupted, the conditions required to interrupt it, whether it produces hitstun, and whether it carries an attack or hurt判定 — that is, whether it has an active hit or hurt volume.
A combo cancel is not “the animation connects, so it counts.” It requires the current move to have reached its cancelable frame, a legal successor to exist in the input buffer, and resource conditions to be satisfied. Cancels should be split into three categories and timed separately: normal cancel (light attack into medium attack), special cancel (medium attack into a special move), and super cancel (consuming full energy within a specific hitstun window). Juggle combos must also check whether the opponent is still in a juggleable airborne state, so you avoid the case where it looks like a hit but the opponent has logically already landed.
Defense, throws, and dashes must be explicitly mutually exclusive. While guarding, no hitbox should be produced. A throw is valid only when both parties are in a throwable state and within range, and it is invalid against airborne targets by default unless the move table declares otherwise. A dash has startup and braking; on boundary collision it should transition into a wall reaction or stop, not pass through the deck.
Directional-input special moves use input sequence matching. The sequence has a time window, and once the window expires the input is discarded, so a direction pressed long ago does not trigger unexpectedly seconds later. The full-energy super move is deducted atomically at the resource layer: check first, then lock, then play the close-up. The simulation step may slow down during the close-up, but hit and invulnerability accounting for both sides must still be kept by the simulation layer; it cannot rely on the camera script “looking like it hit.”
Difficulty, local two-player, and best-of-three
The three difficulty tiers should change decisions, not secretly change the player-side collision. Easy: longer opponent reaction delay, fewer cancels and resource moves, low guard probability. Standard: choose spacing, guard counters, or throws based on distance. Hard: punish the player’s jump landings and guard hitstun more frequently, but still obey the same determination rules with no invisible hit range added. This keeps every hit explainable in a replay, which helps both balancing and teaching.
Local two-player shares the rules layer and simulation layer; input differs only by slot. Pause must freeze both sides’ simulation steps and the timer at the same time, and on resume it must clear the current frame’s input buffer, so a key pressed during pause cannot produce a special move the instant play resumes. Best-of-three counts only valid rounds. The tie policy must be written down in advance — for example, compare remaining health when time expires, and if health is equal, either award a double loss or play an extra round — and the settlement screen must display the same rule text, so UI and logic do not each implement their own version.
Stage, camera, and settlement
For a rainy-deck style scene, secure the playable boundary first: a continuous walking surface, landable landing points, and camera collision that does not clip into characters. Dynamic weather is presentation and must not change friction or visibility that the rules do not declare, unless environmental interference is itself the training objective — in which case state it clearly in the difficulty description. The close-up camera is a temporary presentation-layer position; on exit it must return to the match camera and restore time scaling, otherwise the visual distance of subsequent combos will mislead the operator.
Match settlement should fix at least four pieces of information: the round winner, remaining health, whether energy was depleted, and whether the next state is the next round or the end of the match. Settlement data comes from a simulation-layer snapshot and is never inferred backwards from the UI. The pause menu offers only resume, restart round, and quit. Restarting a round resets that round’s RNG and resources but does not clear rounds already won, unless the user explicitly chooses to restart the whole match.
Quality acceptance: turning “not quite right” into regression items
Acceptance should use a checklist rather than subjective impressions.
- The entry screen and the match use the same character configuration identifier; spot-check that attachment-point names match.
- Each mutually exclusive state has at least one automated or semi-automated case: guarding produces no hitbox, insufficient energy does not trigger a super move, pause does not advance the timer, boundaries are not crossed, and an old combo becomes invalid after the juggle lands.
- The three difficulty tiers show repeatable behavioral differences under the same input script, with player-side determination parameters unchanged.
- Local two-player and single-player AI run the same rules state machine and differ only in input source.
- Simulation time scaling returns to 1 before and after the close-up, and no camera state is left behind.
- On performance, set engineering budgets only, not externally promised product metrics: for example, the simulation step must not skip determinations because effects dropped frames, and when effects exceed budget, reduce particles rather than drop hits. Actual frame rates vary with hardware and should not be written as fixed performance figures.
Implementation order
Start with the rules state machine and two placeholder capsules, and get best-of-three, pause, guard, and one throw working. Then swap in the production skeletons while keeping attachment points and state names unchanged. After that, add cancel windows, energy, and close-ups. Only last, build the rainy-night lighting and camera performance. Reverse the order and art will polish against the wrong collision, which is the most expensive rework.
Logs should record semantic events only: state transitions, hits, resource changes, and round results. When investigating “it hit but health didn’t drop,” you compare the event sequence, not the feel of the recording. Configuration is version-controlled, and at match start the character and stage versions are written into the settlement record so replays remain explainable.
Summary
Whether a 3D combat simulation in a shipboard or deck setting is actually playable depends on entity data, fixed-step simulation, and explicit rules being unified. Two polished characters on the entry screen only prove the render assets are usable. Guard, throws, jumps, dashes, juggle states, cancels, directional specials, energy supers, pause, and best-of-three must all be traceable, pausable, and reviewable inside the same state machine. Build with data-driven character configuration, mutually exclusive body states, determination logic decoupled from difficulty, and a presentation layer that only consumes snapshots — that is how the system moves from “looks complete” to “rules complete.”
