I am building a "game engine" for 2D fighting games. It is not a single game with fixed characters, but a foundation that allows you to add characters, moves, stages, and AI via external JSON files. It is similar in philosophy to MUGEN. I have left most of the implementation to Claude Code, while I focus on setting the direction and managing the review process. After accumulating over 100 tasks, it now runs with 20 characters, 10 stages, and features including special moves, combos, blocking, throws, and simple AI.
I am not a game developer. I usually work on embedded HMI development. I simply wanted to build and verify how the internals of a fighting game are constructed.
What I am doing
The name is Phantom Nexus. The tech stack is Java / LibGDX / Gradle. The key is that "you can expand the content using only data, without touching the game's core code."
Adding a character: One JSON file containing stats, moves, and sprites + one PNG file.
Adding a move: Just write an entry in the normalMoves / specialMoves array.
Adding a mechanic: Just set a flag in the move JSON (I will explain this later).
In a fixed-character system, you create new characters by writing code. With an engine, you just "place the data" to add a new character. This is what makes it interesting, and I have kept adding more.
Workflow
Data flows in one direction. The system reads and validates the JSON, converts it into types (POJOs), and the game engine uses those to run. The game engine itself never reads the JSON directly.
[キャラ/ステージ JSON]
│ 読込+検証
▼
Shared/Schema ──→ Shared/Types(Character / Move / Stage の POJO)
│
▼
GameRuntime(Core / Battle / Rendering / Input)
│
▼
対戦画面
For example, "if this move hits, the opponent gets knocked down" is just a matter of adding a flag to the move JSON.
"name": "heavy_slam", "button": "heavy", "damage": 130, "guardHeight": "overhead", "knockdown": true
By adding knockdown: true, that move will knock the opponent down when it hits unblocked. You don't touch a single line of code. If you add this flag to a new character's move, that new character can also score knockdowns.
Structure
Shared/Schema … The single source of truth for JSON ↔ Types. It only handles reading and validation.
Shared/Types … POJOs like Character / Move / Stage. The raw form of the data.
GameRuntime/Battle … HP, gauge, hitboxes, and attack states (startup/active/recovery).
GameRuntime/Rendering … Sprite rendering, camera, and effects. This is the only place that handles GPU resources (Textures).
Assets/Characters … Character JSON + sprite PNGs. This is where you add new content.
Claude Code … The implementation lead. It handles tasks one by one.
Codex / CodeRabbit / CI Claude … Three-pronged code review.
Note: The key is the strict adherence to 'Consolidate data in Shared, isolate GPU resources in Rendering.' Since the JSON world and the OpenGL world are never mixed, the structure that allows content to grow simply by adding data remains intact.
Method (Approach)
If you add features blindly, consistency will quickly fall apart. Therefore, I decided on the rules first and stacked them one task at a time.
1. Build to MVP in one go first Two characters on screen, including movement, jumping, attacking, HP, and win/loss determination. This serves as the foundation.
2. 1 task = 1 branch = 1 PR The completion criteria for each task is './gradlew build' being green. Breaking it down into small pieces makes it easier to track reviews and audit trails.
3. Design new mechanisms using 'Move JSON flags' Knockdown, invincibility frames, guard height, launching, multi-hit... I made almost everything an optional field in the Move object. Since the default is disabled, the behavior of old data remains unchanged. Characters added later can use those mechanisms without any modifications.
4. Modernize visuals later Shadows, landing dust, screen shake, motion blur, multi-layered backgrounds. I added these all at once as pure visual effects that do not interfere with the logic.
5. Multiplex reviews across three systems CodeRabbit (automated), Codex (final check), and Claude in a separate context (CI). The trick is to have a different Claude than the one that implemented the code look only at the diffs. When you review your own code, you tend to overlook flaws due to justification bias.
Trial Run
The foundation worked smoothly. What I got stuck on was not the game logic, but rather traps in the environment and platform. I will list them calmly.
Docs/ and docs/ turn into the same folder. Design documents are in uppercase Docs/, templates are in lowercase docs/. Windows is case-insensitive, so they collide. GitHub is case-sensitive, which makes it even more complicated. I solved this by standardizing to lowercase.
.gitignore's build/ ignores the entire build. The non-anchored build/ matched Infra/Build/ (uppercase B) due to Windows casing, ignoring the entire set of build logic. I fixed it by anchoring it to the root as /build/. This is a relative of the same casing trap.
Using the Character type causes compilation to fail. In classes that import my own Character (character definition POJO), java.lang.Character is shadowed, causing Character.isDigit() to disappear. I avoided this by using raw comparisons or fully qualified names.
Fading to black with semi-transparent black actually makes the screen brighter. In the headless software GL used for capturing, only the full-screen semi-transparent black was not composited as expected. I stopped using the fade-to-black and replaced it with other expressions like edge gradients or golden glows.
Vulnerable for one frame after waking up from a knockdown. The frame where the character becomes actionable and the frame where they become hittable were off by one frame. I added a one-frame latch to the hit detection side to align the knockdown status for both. I realized this after it was pointed out in a review.
What made me happiest was the moment a new character was added with just one JSON file and one PNG. Without writing a single line of code, that character works using existing mechanisms, including combos, special move gauges, and knockdowns. I felt a real sense of accomplishment confirming that 'data-driven' design was working as intended.
Impressions
Honestly, it's not that I was dissatisfied with commercial fighting games. I just wanted to know what was inside. Even so, once you have a structure where you can add mechanisms with a 'single flag,' adding things becomes purely fun. Just by writing knockdown: true in a move, even the 20th character can be made to fall. This is the meaning of building an engine.
The lesson abstracted one level higher is: 'The more something needs to be extensible, the more you should shift the changing parts into data and build a structure that doesn't require changing the code first.' If you write new mechanisms in code every time, you end up having to touch every character every time you add one. Conversely, by shifting to 'optional flags in move JSON + disabled by default,' old data remains immutable, and new moves or new characters enjoy those mechanisms without any modifications. This felt the same as 'solidifying settings first and inserting implementation later' at work.
Next, I want to refresh the placeholder-style character art. Tools (a character viewer and a hit-box editor) are also waiting in the wings. It is gradually getting closer to the form of the 'fighting game where you can add your own characters' that I admired as a child.
Philosophy: The game engine itself never reads JSON. Data is consolidated into Schema/Types.
Extension Pattern: New mechanisms use arbitrary flags in Move/Character, disabled by default, ensuring legacy data remains unchanged.
Workflow: 1 task = 1 PR; green build is the completion criteria; reviews are shown to Claude in a separate context.
It is a steady accumulation of plain wiring, but in the end, the fact that 'characters increase just by placing data' gives me a sense of satisfaction, as if I have rebuilt the inner workings of a fighting game myself.
Reference
I created a game character using Claude Design.
Moving forward, I plan to incorporate original characters created with Claude Design.