System Design and Implementation of a 3D Warship-Themed Fighting Game
This article explains how to design and build a 3D fighting game built around a warship theme, translating naval warfare concepts into personified "ship soul" characters. It covers the main menu and character showcase, a modular character system built on attributes, state machines, and animation configuration, core combat mechanics such as blocking, throws, jumping, juggling, and combo canceling, input-buffer-based command skills and super moves, AI and local two-player modes, best-of-three match flow, and performance, testing, and extensibility considerations.
1. Project Positioning: Turning a Warship Worldview into Fighting Gameplay
“Warships” usually suggest naval combat, fleet formations, and firepower duels. If we simply adopt traditional ship-control gameplay, the battle centers on speed, range, armor, and mounted weapons. To strengthen character expression and instant feedback, the warship theme can be abstracted into “ship soul avatars” or carrier-based combat units—characters in humanoid form that fight at close quarters while retaining visual elements such as decks, radar, naval guns, searchlights, sea mist, and storms.
This is not merely placing characters in a seaside scene. It requires a unified gameplay logic:
- Character skills should reflect ship traits such as firepower, mobility, defense, or electronic warfare;
- Scenes should serve spatial storytelling and pacing;
- Combat feedback should make players feel that “ship capabilities are personified”;
- The system architecture must support adding more ship soul characters, harbor scenes, and special battle rules.
The original design already includes two characters, single-player versus AI, local two-player mode, three difficulty levels, throws, blocking, jumping, dashing, juggling, combo canceling, direction-based command skills, and super moves—enough for a fairly complete 3D fighting game prototype. The key next step is not piling on more features, but building a stable, maintainable system structure.
2. Main Menu and Character Showcase Design
The main menu is the player’s first touchpoint with the game, so it should prioritize clear information delivery and visual appeal. It is recommended to divide the menu into a background layer, a character display layer, an interaction layer, and a state layer.
2.1 Background Layer
The background can be set in a rainy naval port, on a ship deck, or on a seaside platform. Rain, a distant lighthouse, reflections on the sea, and low-frequency ambient sound quickly establish the atmosphere. Note that background effects must not hurt button readability or cause character silhouettes to blend into the dark environment.
Recommended layering:
- Far view: clouds, sea, distant ship silhouettes;
- Mid view: railings, equipment, searchlights, and ship structures;
- Near view: dynamic effects such as raindrops, mist, and lens water marks;
- Character layer: high contrast and clear silhouettes;
- UI layer: title, start button, mode entries, and control hints.
2.2 Character Display Layer
Character display on the menu should not stop at a static illustration. Consider adding idle animations, breathing motion, gaze changes, subtle movement of weapons or equipment, and slight feedback on mouse or controller hover.
Two common problems to avoid:
- The showcase looks great, but model, lighting, and animation quality drop noticeably once combat starts;
- The menu uses one set of assets while the battle scene uses another, causing inconsistent character appearances.
A better approach is for the menu and combat to share character models, material standards, and animation assets, adjusting only camera, lighting, and post-processing per scene.
2.3 Menu Interactions
The menu should at least provide the following entries:
- Start single-player mode;
- Local two-player mode;
- Character select;
- Controls/How to play;
- Settings;
- Quit or back.
Every entry needs a clear focus state, confirmation feedback, and a return path. For local two-player mode, controller assignment should be completed before entering character select, so two players do not end up controlling the same menu focus.
3. Modular Design of Characters and Combat Scenes
Character systems should combine “base attributes + state machine + animation configuration” rather than putting all logic into a single script.
3.1 Base Attributes
Character base attributes can include:
- Max HP;
- Defense strength;
- Movement speed;
- Jump height;
- Dash distance;
- Normal attack damage;
- Energy gain rate;
- Hit stun duration;
- Juggle resistance.
These parameters should be configured as data wherever possible. Configuration makes it easy to balance characters without modifying core code and simplifies adding new ship soul characters later.
3.2 Combat State Machine
A character must handle at least the following states:
- Idle;
- Walk;
- Dash;
- Jump;
- Fall;
- Normal attack;
- Block;
- Hit stun;
- Juggle (airborne);
- Knockdown;
- Throw;
- Special move;
- Super move;
- Victory;
- Defeat;
- Pause.
State transitions must have priorities. For example, a character in hit stun cannot immediately perform a normal attack; during a super move’s cinematic, both players’ normal input should be frozen; in a knockdown state, only preset behaviors such as getting up, rolling, or teching are allowed.
The logic can be abstracted as pseudocode:
Read input↓Check whether current state allows transition↓Match action and combo window↓Update displacement, collision, and resources↓Process hits, stun, juggle, and camera↓Update UI and audio feedback
3.3 Scene Design
A rainy deck or harbor platform suits the warship theme, but a scene should not be purely decorative. Consider adding boundaries, interactive devices, and staged changes, for example:
- Safe boundaries on both sides of the arena;
- Rain causing ground reflections without altering core hit detection;
- Distant naval gun flashes as background events;
- Lightning briefly changing overall brightness;
- At round end, the camera switching from the combat area to the win/loss presentation area.
Scene events must be decoupled from combat logic. Lightning, rain, and distant explosions are purely presentational and should not directly modify character HP or action states—unless they are explicitly designed as gameplay mechanics.
4. Implementing Core Combat Mechanics
4.1 Blocking and Throws
Blocking is the most basic risk-control tool in a fighting game. A successful block can reduce or fully negate normal attack damage, but chip damage, guard breaks, and throw counters should be considered; otherwise players can turtle indefinitely.
Throws exist to break sustained blocking. A typical throw sequence:
- Check the distance between attacker and target;
- Check whether the target is in a throwable state;
- Play the grab wind-up;
- Lock both characters’ positions;
- Execute the throw animation;
- Resolve damage and knockdown;
- Restore control to both characters.
Throws should not rely solely on model colliders, or you will get cases where a grab succeeds with no visual contact. It is recommended to combine attack range, target orientation, distance thresholds, and throw active frames in the check.
4.2 Jumping, Dashing, and Juggling
A jump should include launch, ascent, apex, descent, and landing phases. Dashing needs to distinguish between ground dash, air movement, and displacement restrictions while in hit stun.
Juggling is the foundation of the combo system. When launched, a character’s velocity depends on the hit direction:
Initial juggle velocity = base juggle value + attack type modifierHorizontal displacement = initial velocity × time + air control modifierVertical displacement = juggle velocity × time - gravity × time² / 2
To prevent infinite combos, set juggle decay, hit-count limits, or progressively shorter hit stun. When a character is about to land, allow a tech option to reduce the helplessness of long knockdowns.
4.3 Combo Canceling
Combo canceling is the key mechanic for depth. Each attack action can be configured with:
- Start-up frames;
- Active frames;
- Recovery frames;
- Cancel window start;
- Cancel window end;
- Allowed follow-up action types.
For example, after a normal attack hits, it can be canceled into a heavy attack, which can in turn be canceled into a direction-based command skill. Distinguish between “hit cancels” and “whiff cancels”—otherwise players could reset actions endlessly on whiff.
The combo system should also provide clear feedback: hit sound effects, combo counters, hit flash, and brief camera shake. However, keep effect intensity under control so character positions stay readable.
5. Command Skills and Super Move Design
Command skills are usually composed of directional inputs plus an attack button. Input recognition should not look at a single frame only; maintain a short input buffer instead.
Input buffer:[back] → [back, down] → [down] → [attack button]If the directional sequence is completed within the time limitand the character is in an executable state,trigger the corresponding skill.
The input system needs to handle diagonal inputs, repeated directions, input spacing, and false triggers. Allow a very short input tolerance, but do not loosen it indefinitely—otherwise normal movement may accidentally trigger skills.
Super moves rely on an energy resource. Energy can build through landing attacks, successful blocks, taking damage, or completing specific actions. When the gauge is full, a high-damage super can be released with a cinematic camera sequence:
- Pause normal combat time;
- Lock both characters’ positions;
- Play the character-specific camera shot;
- Show the skill animation and effects;
- Resolve multi-hit damage;
- Resume combat time;
- Update energy and combo state.
The cinematic must not break hit-detection consistency. The safest approach is to resolve the skill’s logic first, then wrap it in camera work, animation, and effects.
6. AI and Local Two-Player Mode
Single-player mode can offer easy, normal, and hard difficulty levels, but difficulty should not just mean higher attack power. More reasonable differences include:
- Easy: slow reactions, short combos, rarely uses blocking or throws;
- Normal: recognizes spacing, uses blocking and basic combos moderately;
- Hard: faster decisions, stricter resource management, and more aggressive pressure.
AI decisions can be based on distance, HP, energy, current state, and player behavior. For example, when the player blocks constantly, the AI increases throw usage; when the player jumps frequently, the AI raises the probability of anti-air attacks.
The key to local two-player mode is input isolation. Each player must independently bind directions, attack, block, jump, throw, and special buttons, and the current operator should be clearly indicated during character select, pause, and round results. Pause privileges should also be defined in advance to avoid state conflicts when both players request a pause at once.
7. Best-of-Three and Match Flow
Best-of-three should be managed by a dedicated match manager rather than scattering round logic across character scripts. The match manager maintains:
- Current round number;
- Round wins for each side;
- Round start and end states;
- Countdown timer;
- Draw handling;
- Final winner;
- Restart and return-to-menu flows.
When one side’s HP reaches zero or time runs out, the system should freeze input, play the win/loss animations, and show the round result. After two wins, the match enters final results; otherwise combat state is reloaded while preserving necessary match information.
8. Performance, Testing, and Future Extensions
3D fighting games are sensitive to frame-rate stability and input latency. Focus on the following:
- Reduce high-frequency object creation and destruction;
- Use animation, particle, and post-processing effects judiciously;
- Degrade distant effects;
- Separate collision detection into hitboxes, hurtboxes, and stage colliders;
- Avoid expensive lookups every frame;
- Centralize management of combat events, audio, and camera requests.
Testing should at least cover:
- The block/throw counter-play relationship;
- Edge cases for jumping, dashing, and juggling;
- Valid windows for combo canceling;
- State recovery when a special move is interrupted or lands;
- Simultaneous input from two players;
- Pause and restart at round end;
- Character movement near stage boundaries;
- Behavioral stability of AI at different difficulties.
Future extensions could include more ship soul characters, different deck terrains, a training mode, combo records, battle replays, and online play. But before adding content, first ensure fair hit detection, reliable input, and stable state transitions in the core combat. For scenarios requiring cloud capabilities, object storage can hold replays or configuration, logging services can collect exception data, and monitoring/alerting can observe running status; these services are engineering support and should not replace local combat logic.
Overall, the core of a warship-themed 3D fighting game is not merely showcasing characters and effects, but unifying worldview, action systems, hit detection, input response, and match flow. Only by establishing clear module boundaries first, then gradually refining visual presentation and content scale, can the project grow stably from a “menu demo prototype” into a genuinely playable, complete game.
