Hacker News new | ask | show | jobs
by khaliostr 16 days ago
There's a bit of an open source Magic renaissance going on lately, which I find really cool.

Forge has been around forever, but we've managed to get it running in the browser via WASM with Manabrew [1]. I'm one of the maintainers, and we're mostly building it because we wanted a nicer way to play Commander with friends.

Meanwhile, Phase and Ironsmith are working on new engines in Rust, Gorge is building one in Go alongside a bot and cross-engine testing tools, and people are starting to collaborate across projects.

Magic is such a ridiculously difficult game to implement that I think it's pretty amazing how many people are tackling it in their spare time.

If you're into Magic and software engineering, come hang out with us. There's a lot going on and plenty of room for more people to get involved :)

[1] https://github.com/witchesofthehill/manabrew

3 comments

This looks awesome. Will definitely check it out and see if there's anything from my little project here I can contribute!
Thanks! I actually came across Arcana not too long ago, so it's really nice to meet its author here. And bonus points for Rust

We started porting Forge to Rust ourselves, but quickly realised what we'd gotten ourselves into, so we went and built forge-wasm instead.

If you're curious, we've got a small engine spec that lets Manabrew work with different rules engines. Ironsmith (also Rust) already works, and we've got partial support for Phase.rs and Gorge. Would be fun to try Arcana too!

There's also a Discord where a bunch of us working on these engines hang out and compare notes. You should drop by sometime, I suspect we'd have quite a bit to talk about :)

It's cool that there's a community around this, just joined the discord! I made this X post about my own setup a few months ago (many improvements since then though) https://x.com/sgjarmak/status/2091569591705096351

I've mostly been building and playing from a private version of the repo so the public one I am still working toward getting it to non-IP license-appropriate parity. The private version has 3.2k commits and lots of me-and-bot-playtesting behind it, and I have a ton of research docs and bot evals and experiments in there that are probably useful to a community once I finish up the sweep to port stuff to public.

I designed mine more for just my own personal use with an option to be able to also play with my sons and husband over tailscale. I also have it set up to support custom generation of sets (the infra for support is included, but my custom Zelda set is not included in a public repo for obvious IP reasons).

I used to play a bit of cockatrice back in the day, and enjoyed different draft sims because I love drafting, and I designed my interface to follow more MTGO than Arena UI (w/ mobile support when playing from a phone browser).

I've loaded it with all my favorite sets for drafting and sealed (including Legacy Cube), a custom Zelda set with custom mechanics (like 'flurry rush') with generated balanced precons, Commander with some precons, Momir Basic ... and some 'mtg lab' stuff like set analysis for archetype health and matchups etc. ... I'm a scientist + Magic nerd so I feel pretty aligned with the Arcana writeup :D

super work, I'm looking forward to comparing notes! How strong is forge-bot in your opinion?
Hm ... not very strong, like new player at FNM? so not comically bad, but plenty of 'ummm why didnt you do X?' or watching them accidentally kill their own creatures, not realize they should be the beatdown etc. I'm interested in figuring out ways to improve the bots though.

I started a new job at the end of September so most of my docs end around mid September because I was swept up in that, this was the latest bot design plan: https://github.com/sjarmak/mtg/blob/main/docs/research/gener...

and some prior art research on designing and optimizing them: https://github.com/sjarmak/mtg/blob/main/docs/research/prior...

but interested in dusting off the code and revisiting some of my designs

Have you had legal challenges?

Are you just crossing your fingers for now?

We've done our homework, at least as much as a small OSS project reasonably can :D

Forge and Cockatrice have both been around for a long time and have had to navigate legal concerns around card art and Wizards' trademarks. One approach has been to avoid distributing the artwork directly and let users fetch it separately from Scryfall. Forge itself is over 15 years old at this point.

We've taken a similar approach with Manabrew. We don't bundle card art or Wizards' trade dress, the project is entirely free and open source, and people can self-host it. We're also careful not to present it as an official Wizards product.

That doesn't mean there's zero legal risk, of course. But we're not simply crossing our fingers either.

This looks amazing. I will definitely try it out