3D Fighting Game System Design: Warship Deck Stage, Combat State Machine, Input Buffering, and Performance Optimization
This article explains how to move a 3D fighting game from a visually polished character-selection prototype to a stable combat system in a warship-deck setting. It covers separating the deck’s visual background from the playable combat space, defining movement and character data, managing combat states and cancel windows, buffering and interpreting player input, using simplified hit and hurt regions for collision resolution, tuning AI difficulty through decision quality, and coordinating rounds, pause, super-move cinematics, and performance testing. The goal is to make input predictable, rules explainable, and feedback perceivable while keeping visual adjustments from changing combat logic.
1. From a Visual Prototype to a Complete Combat System
A common issue in 3D fighting game development is that the character-selection page has strong visual presentation, but once players enter a match, input feedback, character actions, and combat pacing feel immature. The problem is usually not whether the models are detailed enough. It is that the presentation system and the combat system serve different goals.
A presentation page mainly emphasizes character appearance, materials, lighting, and composition. Actual combat must continuously handle input sampling, action transitions, collision detection, damage resolution, camera tracking, and round state. The completeness of a static screen does not directly represent the completeness of the game system.
With a warship theme, the virtual deck can be designed as the combat stage while retaining basic requirements such as two characters, single-player challenge, local two-player mode, best-of-three rounds, and multiple combat actions. The warship here is only a fictional visual scene. It does not involve reproducing real vessel structures or simulating military systems.
The core goal of the project should be stated clearly: deliver a 3D fighting experience in a stage with warship visual characteristics, where input is predictable, rules are explainable, and feedback is perceivable.
2. Warship Deck Stage: Visual Richness Does Not Require Complex Rules
2.1 Separate Background Presentation from Combat Space
The deck can create scene recognition through railings, cabin exteriors, the distant sea, and lighting, but the playable combat area must remain clear. If decorative objects also participate in character collision, they can easily cause blocked movement, camera occlusion, and inconsistent boundary judgments.
It is recommended to divide scene objects into three categories:
- Combat ground: supports character standing, landing, and movement constraints.
- Rule boundaries: limit the combat area and handle cases where a character is knocked back to the edge.
- Background decoration: provides visual atmosphere and, in principle, does not affect combat judgment.
This layering reduces the impact of scene art adjustments on combat logic and helps testers locate problems.
2.2 Define the Movement Model First
A 3D character does not necessarily need fully free 3D movement. For an early prototype, the main combat plane can be built from horizontal movement and vertical jumping, while the visuals are presented with 3D models and a three-dimensional scene.
If a free-movement model that allows characters to circle around each other is chosen, then lateral dodging, target locking, attack orientation correction, and camera rotation rules must be designed at the same time. Otherwise, when a character moves behind the opponent, the attack direction may conflict with player expectation.
Combat rules should be defined before scene presentation. The deck should not look wide and therefore justify opening unverified movement freedom.
2.3 Control Interference from Weather Effects
A rainy-night atmosphere can emphasize deck reflections and environmental depth, but raindrops, splashes, and strong reflections should not obscure attack actions. The combat area should maintain stable light and shadow relationships, and character silhouettes, foot positions, and attack ranges should be quickly identifiable.
Ship-body sway in the scene should preferably be expressed through subtle changes in the background or camera. The physical ground beneath the characters should not be changed arbitrarily. If sway affects combat rules, it must be designed as an explicit mechanic rather than hidden inside visual effects.
3. Character System: Make the Two Characters Genuinely Play Differently
The difference between two characters should not be limited to appearance and animation. Character independence should be formed by movement ability, attack range, move rhythm, and resource usage together.
For example, one character can lean toward close-range pressure, maintaining advantage through faster approach actions and continuous attacks. Another character can lean toward distance control, creating different decisions through longer attack range and more obvious recovery risk. These are design directions, not verified balance conclusions.
Character data can be split by responsibility:
- Base attributes: health, movement speed, jump behavior, and similar values.
- Move definitions: startup, active, and recovery phases, plus hit effects.
- Action resources: animations, sound effects, particle effects, and camera cues.
- Behavior constraints: allowed cancel actions, throw conditions, and special states.
Separating data from logic allows developers to adjust character differences without modifying repeated conditions in multiple combat modules. Character balance should also be based on testing. Equal damage on both sides does not automatically mean fairness.
4. Combat State Machine: Restrict Invalid Action Combinations
If jumping, dashing, guarding, and attacking each respond independently to button presses, combinations that violate the rules may appear. For example, a character may continue dashing while being hit, or enter a normal attack during a throw animation.
An explicit state management mechanism should be used. Common states include idle, movement, jump, attack, guard, hit, being thrown, knockdown, and round end. Each state needs defined entry conditions, exit conditions, and accepted inputs.
An attack action can usually be divided into three phases:
- Startup phase: the character begins the move, but no effective attack has occurred yet.
- Active phase: the attack region can trigger hit detection.
- Recovery phase: the attack has ended, but the character cannot yet act freely.
Guard, throw, and combo cancel rules should all be built around these rules. Canceling is not interrupting an animation at any time. It is transitioning from the current move to a specific follow-up action within an allowed time window.
An illustrative logic can be written as:
On attack command:If current state allows a direct attack:Enter the corresponding moveElse if the current move is within its cancel window:If the follow-up move is an allowed cancel target:Perform the state transitionElse:Keep or discard the command according to the input buffer rules
The animation layer is responsible for presenting the action. The combat logic layer is responsible for deciding whether the action is valid. The two need to be synchronized, but they should not replace each other.
5. Input System: From Key Events to Move Intent
5.1 Build Input Buffering
When a player presses an attack button, the character may still be in the recovery phase of the previous action. If the system discards the input immediately, controls may feel unresponsive. If the input is retained indefinitely, a move the player no longer wants may execute after a long delay.
Therefore, valid commands should be stored within a limited time window and consumed when the character enters an allowed state. The window length needs to be determined through actual feel testing and should not be set arbitrarily without considering move rhythm.
5.2 Recognize Directional Combinations Using Relative Facing
Directional special-move inputs should recognize “forward relative to the opponent” and “backward relative to the opponent,” not only left and right on the screen. When characters swap positions, input interpretation must change accordingly.
For cases such as crossing over the opponent, air turning, and continuous movement, the timing of facing updates must be defined. Input records should also include temporal order to distinguish normal operations, repeated presses, and expired directional sequences.
When multiple moves satisfy the conditions at the same time, there must be a stable matching priority to prevent normal attacks from incorrectly overriding special moves.
5.3 Isolate Input Contexts for Local Two-Player Mode
Local two-player combat should create independent input records, key mappings, and device ownership for both players. Interface operations such as pause, confirm, and cancel also need defined permissions.
If two players share the same input device, the actual behavior of simultaneous key presses should also be tested. When the device cannot correctly report combination inputs, changing only the game logic may not solve the problem.
6. Collision and Resolution: Use Rule-Based Judgment Instead of Visual Guesswork
3D model outlines are complex, so the complete model mesh should not directly decide whether an attack hits. Simplified attack regions and hurt regions can usually be used to make judgment more stable and cost more controllable.
The attack region represents where a move can produce an effect. The hurt region represents the area where a character can be hit. The push region between characters controls their distance. These three should be managed separately.
Each attack also needs a clear rule for whether repeated hits are allowed. If the same attack region persists across multiple update cycles, damage may be resolved repeatedly without a deduplication mechanism. This can be handled through attack instance identifiers, target records, and multi-hit rules.
Guard judgment should consider attack type, character facing, current state, and guard input. Throws should separately validate distance, target state, and whether both characters enter a mutually exclusive throw process.
Airborne states and combos need to control both hit state and movement trajectory. It is not enough to play an upward-launch animation while leaving the character’s collision body on the ground. Continuous attacks should also not repeatedly reset airborne conditions and create unintended infinite combos.
7. AI Difficulty: Adjust Decisions, Not Future Knowledge
Single-player mode can offer easy, standard, and hard levels, but difficulty should not be implemented only by increasing health or damage.
More reasonable adjustment dimensions include:
- Reaction delay: how long the AI takes to respond after observing an attack.
- Judgment accuracy: whether it misjudges distance, move type, or guard timing.
- Behavior richness: whether it can use throws, combos, and resource management.
- Risk preference: whether it is willing to approach proactively or attempt high-risk actions.
Easy difficulty can leave more punishable mistakes. Standard difficulty emphasizes basic offense and defense. Hard difficulty adds move combinations and situational judgment.
AI should primarily make decisions based on observable combat states. If it directly reads inputs that the player has not yet expressed through character actions and immediately performs perfect counters, it may increase win rate but damage the sense of fairness.
8. Unified Management of Rounds, Pause, and Super Move Cinematics
Best-of-three rounds require an independent match management module responsible for the intro, combat start, round end, score update, and final resolution.
Cases such as health reaching zero, time expiring, and both sides losing combat ability at the same time should each have clear rules. Resolution events must avoid repeated triggering so that one victory is not recorded twice.
Pause is not simply stopping character movement. Whether combat timing, throw processes, particle effects, audio, and AI decisions pause should all be specified consistently. The pause menu itself must continue to respond to input.
A full-energy super move can include resource checks, state transitions, attack execution, and a close-up camera. Camera presentation must serve combat feedback. Players should not be unable to understand the hit position or recovery timing.
When slow motion is involved, combat simulation time and interface time should be distinguished. After the camera returns to the normal view, the correct composition must also be restored so that characters do not run out of frame or become hidden by the background.
9. Performance Optimization and Acceptance: Measure First, Then Adjust
A warship scene can easily accumulate many reflective materials, dynamic lights, and transparent weather effects. Performance analysis should check character animation, logic updates, collision detection, and rendering separately. Visual stuttering alone should not lead to the conclusion that the models are too complex.
Optimization can prioritize reducing updates in invisible areas, controlling the number of repeated effects, simplifying distant objects, and reusing short-lived objects that are frequently created. After adjustments, retest under the same scene and the same operation sequence to confirm that optimization has not changed combat rules.
Acceptance testing should at least cover:
- Directional combination recognition after the two characters swap facing.
- Boundary conditions for attack canceling, input buffering, and continuous hits.
- Knockback, throws, and landing handling at the deck edge.
- Whether resuming after pause affects timing and resource resolution.
- Mutual isolation of simultaneous inputs in local two-player mode.
- Camera and character state recovery after a super-move cinematic ends.
- Best-of-three flow and special draw cases.
It is recommended to complete the minimum loop of “movement, normal attack, hit reaction, and win/loss resolution” first, then gradually add throws, airborne states, combo cancels, and close-up cinematics. Each new mechanic should be accompanied by tests instead of waiting until all features are stacked together for a single repair pass.
10. Conclusion
A warship scene can establish a distinctive visual theme, but the quality of a 3D fighting game ultimately depends on whether input, state, judgment, and feedback are consistent. The character presentation page solves the first impression. The combat system solves the ongoing experience.
By clearly dividing scene responsibilities, establishing verifiable combat rules, isolating input from animation logic, and driving iteration with measurement and testing, developers can gradually turn a visually complete demo prototype into a stable, playable, and maintainable game system.
