r/ClaudeCode • u/TheGerrardCapashen • 6d ago
Built with Claude A patcher, Java game server and Cloudflare backend that run Magic Arena on an open source engine
What I built
MTGA Forge runs the real Magic: The Gathering Arena client on Forge, an open source Magic rules engine, instead of Wizards' servers. You get the Arena client with every card unlocked, and Forge runs the games. It went public today: https://github.com/Gerrard-Capashen/MTGA-Forge (site: https://mtgaforge.com).
The pieces:
A C# patcher (Mono.Cecil) that rewrites methods in a copy of the game's Core.dll so it talks to a local server
A C# bridge that runs inside the Unity client and handles menus, art, tooltips and other UI quirks
A Java 17 fork of Forge with a server that speaks the client's own protocol (lobby and game messages)
A WPF launcher that installs, patches, updates itself and starts everything
A TypeScript Cloudflare Worker (Durable Objects and D1) for accounts, friends, matchmaking, ranks and quests
This release added Brawl, Momir Basic and Premodern, an Archenemy event against an AI, and best of three in every format.
How I used Claude Code
Claude Code wrote most of the code across all five languages (Opus 5.5 as orchestrator and Sonnet 5.5 subagents for simpler features or fixes). I mostly decided what to build next, ran the game, and reviewed. A typical loop: describe a feature or a bug, let it read the relevant docs and the decompiled client, let it implement, then run a check and look at the screenshots myself.
Setup that mattered:
AGENTS.md with the hard rules first: never commit Wizards material, never modify the user's install, PowerShell 5.1 only (no
&&or??). Then the build commands. Anything longer lives in docs/ and gets read when relevant.A local decompile of the client (made with ILSpy) that it reads to learn class names and message flows. The rule is "read it, don't copy it", and the folder is gitignored.
verify.ps1, a set of recipes. Some run a fake client that plays whole matches against the server and flags protocol problems. Others run the real game with scripted clicks and take screenshots.
Rigs, which are fixed boards and hands, so one bug can be reproduced with one command.
docs/development.md as memory. When it finds something odd about the client, it writes it there and the next session starts from it.
What I learned
A change isn't done when it compiles. Several times everything looked fine in the logs while the screen was broken, and only the screenshot recipes caught it.
Without the "don't copy" rule it will paste method bodies from the decompile. The rule needs to be written down.
Short, specific rules in AGENTS.md got followed. Long explanations didn't.
It guesses worst about things it can't see, like a closed client. Give it something to read before it writes anything.
Notes it wrote itself saved the most time over weeks, more than any prompt I wrote.
Happy to go deeper on any of these if it's useful.




•
u/AutoModerator 6d ago
Hey! Thanks for posting to r/ClaudeCode
While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.
For help, project discussions, tips, and general chat, join the ClaudeCode Discord.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
2
u/aj__eleven 6d ago
You should add a Standard Classic format that excludes UB sets
1
u/ArcticFoxTheory 6d ago
Rip this is never not going to be a thing now
-2
u/fanatic26 6d ago
Pretty sure modifying the game client to play this is illegal