← Back to Product Feed

Hacker News Show HN: A (de)compiler and parser/engine for custom Magic: The Gathering cards

The first MTG engine to live compile the entire card collection at runtime, enabling playtesting of custom cards and semantic similarity scoring for AI-assisted development.

2
Traction Score
0
Discussions
May 3, 2026
Launch Date
View Origin Link

Product Positioning & Context

AI Executive Synthesis
The first MTG engine to live compile the entire card collection at runtime, enabling playtesting of custom cards and semantic similarity scoring for AI-assisted development.
This project presents a sophisticated WASM-based engine for Magic: The Gathering, distinguished by its runtime compilation of card logic. This approach, contrasting with individual card coding, offers scalability and flexibility for managing a vast and evolving card set. The integration of AI-influenced development, particularly using semantic similarity scoring with vector embeddings to validate decompiled card text against originals, represents an innovative quality assurance methodology. This minimizes reliance on extensive behavioral tests, streamlining development for complex rule systems. While focused on a game, the underlying architecture for dynamic rule interpretation, AI-assisted validation, and P2P networking holds significant implications for B2B applications requiring flexible, rule-driven systems and robust content validation, especially in areas like legal tech, compliance, or complex configuration management.
Hey HN! I've been working on this for the past few months and I think it's at the point where I'm ready for some user feedback.It's a WASM engine attempting to accurately model all of MTG's rules and cards. AFAIK, this is the first MTG engine which tries to accomplish this by live compiling the entire card collection at runtime, instead of coding each individual card.You can create your own unique cards to playtest against ("Compile Card" button is what you're looking for), as long as they follow the engine's supported grammar (which I'm working on so that it fully supports Magic's ~30k legally playable cards, currently at 23k partially/17k fully supported).It also supports 4-way P2P multiplayer lobbies via PeerJS, though I haven't had enough time to test everything network related so there may be some hidden bugs there!My dev process was heavily influenced by the recent surge in agentic coding, but I think I've settled on an architecture which successfully manages to avoid slop creeping in:Each card from its original, normalized oracle text into a CardDefinition struct which contains every single behavior for that particular card. By the time this card definition is compiled, we no longer have access to the original oracle text.Each effect in the card's compiled definition can be decompiled into human readable text, after which a series of normalization steps based on the AST structure of the card's compilation and a post-pass to cleanup awkward wording is applied. The resulting compiled oracle text is compared against the original card's using vector embeddings, which gives us a semantic similarity score.The entire purpose of this development workflow is making it obvious to the AI which cards are working correctly and which ones still need better support, without having to rely on behavioral tests for every single card. It took me some time until I finally managed to get the architecture to the point where the AI doesn't cheat its way into improving the card coverage, but the whole experience has been a fantastic way of getting used to this new way of coding and I'm excited to see how the future of our profession looks like in a few years.I'm looking for any kind of feedback, both UI/UX and engine related, so please share your thoughts!
WASM engine accurately model all of MTG's rules and cards live compiling the entire card collection at runtime coding each individual card create your own unique cards playtest Compile Card supported grammar

Related Ecosystem & Alternatives

Discover adjacent products, open-source repositories, and developer tools sharing similar technical architecture.

Deep-Dive FAQs

What is A (de)compiler and parser/engine for custom Magic: The Gathering cards?
A (de)compiler and parser/engine for custom Magic: The Gathering cards is analyzed by our AI as: The first MTG engine to live compile the entire card collection at runtime, enabling playtesting of custom cards and semantic similarity scoring for AI-assisted development.. It focuses on This project presents a sophisticated WASM-based engine for Magic: The Gathering, distinguished by its runtime compilation of card logic. This appr...
Where did A (de)compiler and parser/engine for custom Magic: The Gathering cards originate?
Data for A (de)compiler and parser/engine for custom Magic: The Gathering cards was aggregated directly from the Hacker News community ecosystem, representing raw developer and early-adopter sentiment.
When was A (de)compiler and parser/engine for custom Magic: The Gathering cards publicly launched?
The initial public indexing or launch date for A (de)compiler and parser/engine for custom Magic: The Gathering cards within our tracked developer communities was recorded on May 3, 2026.
How popular is A (de)compiler and parser/engine for custom Magic: The Gathering cards?
A (de)compiler and parser/engine for custom Magic: The Gathering cards has achieved measurable traction, logging over 2 traction score and facilitating 0 recorded discussions or engagements.
Which technical categories define A (de)compiler and parser/engine for custom Magic: The Gathering cards?
Based on metadata extraction, A (de)compiler and parser/engine for custom Magic: The Gathering cards is categorized under topics such as: WASM engine, accurately model all of MTG's rules and cards, live compiling the entire card collection at runtime, coding each individual card.
Are there open-source alternatives related to A (de)compiler and parser/engine for custom Magic: The Gathering cards?
Yes, the GitHub ecosystem contains correlated projects. For example, a repository named fikrikarim/parlor shares highly similar architectural descriptions and topics.
How does the creator describe A (de)compiler and parser/engine for custom Magic: The Gathering cards?
The original author or development team describes the product as follows: "Hey HN! I've been working on this for the past few months and I think it's at the point where I'm ready for some user feedback.It's a WASM engine attempting to accurately model all of MTG's rules a..."

Community Voice & Feedback

No active discussions extracted yet.

Discovery Source

Hacker News Hacker News

Aggregated via automated community intelligence tracking.

Tech Stack Dependencies

No direct open-source NPM package mentions detected in the product documentation.

Media Tractions & Mentions

No mainstream media stories specifically mentioning this product name have been intercepted yet.

Deep Research & Science

No direct peer-reviewed scientific literature matched with this product's architecture.