3D Fighting Game Core System Design and Implementation Guide
This guide presents a reusable architecture for building the core systems of a 3D fighting game, using a neutral project codenamed "Warship" as the reference. It covers how to separate character presentation from logic, organize stages into collision, visual, atmosphere, and audio layers, and drive combat with a finite state machine and frame data. It also explains input buffering and command recognition, explainable three-tier AI based on decision weights, the local two-player match flow, defense and throw resolution, juggle and cancel windows, meter and camera behavior, and performance practices such as fixed-step logic, LOD, and hot-reloadable frame data. The design is engine-agnostic and relies only on common scene organization, animation states, and physics and rendering pipelines.
1. Introduction: Closing the Engineering Gap Between a Stunning Menu and a Playable Match
A common pattern in 3D fighting game development is a homepage that looks impressive. Character showcases and stage atmosphere deliver strong visual impact, yet the experience drops noticeably once the actual match begins. The problem is usually not the art, but the engineering completeness of the combat system. Using a neutral project codenamed “Warship,” this article abstracts a reusable core system design for 3D fighting games, covering resource organization, state machines, frame data, AI, the two-player flow, defense and throws, juggles and cancel windows, meter and camera, and pause and results screens.
This article does not depend on any specific commercial engine or third-party product. All descriptions stay within general technical territory, and developers can implement them using common industry approaches to scene organization, animation states, and physics and rendering pipelines.
2. Resource Organization for Characters and Stages
2.1 Character Split: Decoupling Presentation from Logic
Split each character into three layers:
- Presentation layer: skeleton, meshes, materials, face, and cloth.
- Logic layer: state machine, attribute table, input buffer, and hitboxes and hurtboxes.
- Data layer: frame data tables, move tables, and AI weight tables.
Two independent characters (for example, codenamed A and codenamed B) should share the same logic layer interface and differ only in the data layer. This significantly lowers the marginal cost of adding new characters.
Illustrative data structures:
CharacterDef {id, displayNameskeletonAsset, meshSetmoveTable: MoveDef[]aiProfile: AiWeightSethurtboxSet, hitboxSet}MoveDef {id, inputNotation, startup, active, recoverydamage, hitstun, blockstun, pushbackcancelWindow, airOk, meterGain}
2.2 Stage Organization: Layered Construction of a Rainy Rooftop
For a stage such as a rainy rooftop at night, organize it into layers:
- Collision layer: ground, boundaries, and destructible objects.
- Visual layer: distant skyline, mid-ground buildings, and near-ground rain streaks and reflective surfaces.
- Atmosphere layer: fog, volumetric light, rain particles, and wet-surface reflections.
- Audio layer: rain, footsteps, and metallic echoes.
The key is to fully separate atmosphere from hit detection, so particles and post-processing do not affect frame rate stability and, in turn, the determinism of frame data.
3. Combat Core: State Machine and Frame Data
3.1 Finite State Machine and Sub-States
Character states should include at least idle, walk, backstep, jump, landing, hitstun, block, throw startup, throw hit, airborne, knockdown, wakeup, dash, and cancel window. Each state explicitly declares the set of states it can transition to, and implicit jumps are not allowed.
StateIdle -> {Walk, Jump, Crouch, Attack, Dash}StateAttack -> {CancelWindow, Recovery, Hitstun}StateHitstun -> {Blockstun, Airborne, Knockdown}
3.2 Frame-Data-Driven Logic
Describe every move with startup frames, active frames, and recovery frames, run logic at a fixed step (for example, 60 Hz), and decouple rendering with interpolation. This ensures:
- Hit detection is reproducible.
- AI decisions and replay playback stay consistent.
- Network or local two-player synchronization is more stable.
3.3 Input Buffer and Command Recognition
Directional special moves require an input buffer and a leniency window. A recommended approach combines direction history, a time window, and normalization:
buffer.push(dir, frame)match(pattern, window=8, leniency=2)
Also provide a simplified mode that maps complex commands to a single key or two keys, lowering the barrier to entry.
4. AI Design: Explainable Implementation Across Three Difficulty Tiers
AI should not rely on stat cheating, but on differences in decision weights. The three tiers can be defined as:
- Easy: high reaction delay, low guard probability, short combos.
- Standard: guards and counterattacks, medium combos, average meter management.
- Hard: reads inputs, cancels more often, and manages meter and spacing better.
Illustrative pseudocode:
if distance > preferredRange: approach()else if opponent.attacking and rng() < blockRate(difficulty): guard()else if meter >= 1 and punishWindow: superMove()else: poke()
The key is to drive all randomness with a controllable seed, which makes debugging and regression testing easier.
5. Local Two-Player Mode and Match Flow
Recommended flow: title screen -> character select -> stage confirm -> best-of-three match -> results -> return. Key points:
- Character select needs locking and a countdown.
- Each round resets state but keeps the score.
- The pause menu must freeze the logic step and mute audio.
- The results screen shows the winner, combo count, maximum damage, and other statistics.
6. Defense, Throws, and Hit Detection
Defense is split into standing block and crouching block, and the system must distinguish blockable from unblockable attacks such as throws. A throw is essentially a close-range command hit, and on success it enters a dedicated hit reaction and presentation. Recommended resolution order: throw > strike > projectile, to avoid same-frame conflicts.
resolveHit(a, b):if a.type == throw and b.grounded and !b.invincible: applyThrow()else if overlap(a.hitbox, b.hurtbox): applyHit()
7. Juggles, Combos, and Cancels
Juggles are triggered by launch attributes, while gravity and damping determine hang time. Combo cancels depend on the cancel window and the number of cancels already used, which prevents infinite combos. Recommended rules:
- Open a limited cancel window after each hit.
- A super move consumes full meter and triggers a close-up camera.
- Logic may continue during the close-up, but input is restricted, keeping presentation and hit detection consistent.
8. Performance and Stability Recommendations
- Separate logic from rendering and use a fixed step.
- Allow particles and post-processing to scale down.
- Apply LOD to character skeletons and materials.
- Support hot updates for key frame data to make balance tuning easier.
9. Conclusion
The “stunning menu, underwhelming match” problem in 3D fighting games usually comes from a combat system that lacks the strict constraints of frame data and a state machine. Modularizing characters, stages, AI, flow, hit detection, camera, and results, and making them data-driven, is what produces a match experience that is playable, tunable, and extensible.
