XMage: A Full Rules-Enforcement Magic Engine You Can Host Yourself
XMage - Magic Another Game Engine. XMage, Magic, Another Game Engine XMage allows you to play Magic against one or more online players or computer opponents.
At a glance
- What is it?
- XMage is an open-source Java engine that enforces Magic's rules for online and offline play, with a client-server design that keeps hidden information server-side. It is a serious option for players who want control over their games, but it carries real setup and performance costs.
- Who is it for?
- Adopt XMage if you want a self-hosted, rules-enforcing Magic engine with broad card coverage and a test suite that gives some confidence in correctness. Do not adopt it if you expect a polished, low-maintenance client or if you need a solution that runs well on modest hardware.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 1 day ago.
- What is it written in?
- Mainly Java, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on September 14, 2026, and from our analysis. They are not legal advice.
DEEP OPEN-SOURCE ANALYSIS
What XMage Solves and Who It Serves
XMage addresses a specific problem: playing Magic with full rules enforcement outside of official digital clients. It is for players who want to play against friends, strangers, or AI without a human judge, and for those who want to host their own server, including fully offline. The README states it supports over 32,000 unique cards and more than 91,000 reprints, which covers official sets and custom ones like Star Wars. That scale is the core value: a rules engine that knows the cards and their interactions. The target user is someone who already knows Magic and wants a free, self-managed way to play. It is not for casual players who want a slick, guided experience; the project assumes you can download a launcher, set Java options, and troubleshoot GUI artifacts.
Client-Server Architecture and Cheat Prevention
The architecture is client-server, and that choice is central to how XMage works. The README emphasizes that all rules and hidden information are enforced server-side, so clients never see data they are not authorized to see. This design makes cheating harder because a client cannot peek at an opponent's hand or the top of a library. The server runs the game logic, and the client is a view. That is a meaningful difference from peer-to-peer solutions. It also means you can run a public or private server, and the same server code handles AI opponents. The trade-off is that you need a server process running even for single-player games against the AI, as the README says you must run the server app and connect via localhost. That is an extra layer of complexity compared to a purely local engine.
Getting It Running: Launcher, Java, and Memory Flags
Installation is not a single command. You download files from xmage.today and follow their instructions. You need Java 8 or later to run the launcher. The README recommends unpacking to a folder like D:\games\xmage and explicitly warns against Program Files or Download folders. After launching, you must run the server app to play against AI, then connect to localhost. Performance tuning is manual: go to Launcher -> Settings -> Java tab -> Client java options, and add a flag like -Xmx3000m. The README gives specific recommendations: 2000m for 1080p, 3000m for 4k, and notes that giving 5+ GB is useless. If you play many AI games, you should set the server java options similarly. These are concrete, real steps, but they are not automated. A user who expects a double-click installer will be frustrated.
The Test Suite: Confidence and Its Limits
The README claims the engine has roughly 9,000 unit tests and about 80% coverage, and calls it the most tested open-source rules enforcement engine. That is a strong claim, and the number is verifiable from the repository, but coverage percentage does not guarantee correctness for every card interaction. Magic has thousands of edge cases, and a test suite can miss a specific combo or a recent set's mechanic. The tests are a real asset for developers who want to contribute, because they provide a safety net when changing rules code. But for a player, the test count is indirect evidence. It does not tell you whether a specific card you want to play works correctly. You may still encounter bugs, and the README points to a GitHub issues page for bug reports, which implies bugs do occur.
Performance and the Memory Trade-Off
Performance is a known pain point, and the README addresses it directly. The main fix for micro-freezes is increasing max memory via the -Xmx flag. The recommended values are modest: 2000m for 1080p, 3000m for 4k. The README explicitly says it is useless to give 5+ GB, which suggests the engine has a memory ceiling beyond which extra RAM does not help. That is a useful constraint for planning. If you run a server for multiple players or many AI games, you need to allocate memory to the server process as well. On a low-spec machine, this could be a barrier. There is no mention of GPU acceleration or multi-threading; the performance model is single-process Java with a heap limit. Users on Raspberry Pi or non-standard Linux hardware are directed to a GitHub issue, which indicates support there is not guaranteed.
Known Failure Modes and Platform Pitfalls
The README's troubleshooting section is a list of known issues, and that is honest. There are freezes on startup, image download failures, GUI drawing artifacts on Windows, and specific problems on MacOS with M1/M2 chips. For Linux, there are issues with non-standard hardware and GUI artifacts. These are not hypothetical; they are linked to real issue reports. The takeaway is that XMage is not a polished cross-platform application. It works, but you may need to apply workarounds. For example, a MacOS user on an M1/M2 may need to follow a specific issue thread to get the client running. A Windows user may need to adjust Java options to fix ugly cards. These failure modes are part of the cost of using a community-maintained engine. If you are not comfortable reading issue threads and tweaking settings, this is the wrong tool.
Alternatives and the Difference in Approach
The main alternative is official Magic digital clients like MTG Arena or Magic Online. Those are closed-source, commercially supported, and do not allow self-hosting or custom sets. Their rules enforcement is also full, but you cannot modify the engine or run your own server. Another open-source option is Cockatrice, which is a tabletop simulator that does not enforce rules; it relies on players to manually apply card interactions. That is a fundamental difference: XMage enforces rules, Cockatrice does not. If you want a quick game with friends and trust everyone to follow the rules, Cockatrice is lighter and easier to set up. If you want AI opponents, drafts, and a rating system, XMage has those features, but you pay for them with a heavier server-client setup. The choice is between a rules-enforcing engine with setup complexity and a manual simulator with simplicity.
Maintenance, Upgrades, and License
The project is actively maintained: the last push was August 2026, and releases are frequent, with versions like 1.4.61V1 and 1.4.60V3. That means you can expect updates for new card sets, but it also means the software changes often. Upgrades are not automatic; you download a new release and reinstall. The README does not describe an upgrade path, so you may need to preserve your settings, such as the -Xmx flags, across updates. The license is MIT, which is permissive: you can use, modify, and distribute the code with minimal restrictions. That is a plus for developers who want to fork or extend the engine. For players, the license has no direct impact. The maintenance cost is ongoing, but it is the community that bears it. You do not pay a subscription, but you do spend time on setup and troubleshooting.
Editorial conclusion
Adopt XMage if you want a self-hosted, rules-enforcing Magic engine with broad card coverage and a test suite that gives some confidence in correctness. Do not adopt it if you expect a polished, low-maintenance client or if you need a solution that runs well on modest hardware. Before committing, verify the Java version compatibility on your OS, check the FAQ for known GUI and startup issues, and test the memory settings with your actual screen resolution. The project is actively released, with the latest push in August 2026, but the burden of setup and tuning falls on you.
Community notes