9 ms·
Open source rules engine for Magic: The Gathering
- sigma5 3y agoThere is also Xmage https://github.com/magefree/mage https://github.com/magefree/mage
- mnky9800n 3y agoThere should be a screenshot on the homepage to show what gameplay is like
- 542458 3y agoLooks like this, but most aspects are customizable. http://3.bp.blogspot.com/-YCBsMRvKDQk/T1JrA2inI1I/AAAAAAAABuc/ImEmiFFk43k/s1600/forge%2Bscreenshot.png http://3.bp.blogspot.com/-YCBsMRvKDQk/T1JrA2inI1I/AAAAAAAABu...
- archargelod 3y agoThere are a couple gameplay videos on youtube. https://www.youtube.com/watch?v=DKyJcVmHhEI https://www.youtube.com/watch?v=DKyJcVmHhEI
- deleted 3y ago[deleted]
- archargelod 3y agoThat's my favourite way to play magic. Real cardboard magic is very expensive hobby. Digital magic (like Mtg Arena) is usually toxic, too competitive and meta-driven for my liking. So, instead, I enjoy playing against AI. And AI here is actually decent. It can't do combo or play slow control decks well, but with aggro archetypes it's an actual challenge. If you want to try it - start with Adventure - it is a mode where you get a starter deck and go into the open world to explore and challenge other planeswalkers. You earn cards and gold that can be spent on more cards. It's fun because you don't get stuck playing the same best cards over and over. All cards from a long magic history are available and have equal chances to show up in rewards. It takes a skill to build a deck from pile of random variable quality cards. But, oh boy, does it feel good when you get good at it.
- 542458 3y agoI mostly play commander, and find the AI to be pretty dumb to be honest. That’s not saying it’s not fun! But I find that even with the AI using simple deck archetypes I usually have to put three of them on an enemy team before they hit moderately-skilled-human-player levels of challenge. The AI is pretty bad at threat assessment, so removal, counters and board wipes get used pretty randomly sometimes.
- archargelod 3y agoIf you want to feel more challenge - try the "experimental" difficulty level for opponents. And maybe enable AI cheating (they would see cards in your hand). Normally, I believe, AI can blunder or miss some triggers. But with these settings they'll try to play more optimally.
- prepend 3y agoHas anyone recreated Shandalar in this engine?
- archargelod 3y agoThe adventure mode is basically the Shandalar. It was added only a couple years ago by a single developer[0]. But it had excellent support since, especially in 2023. And right now it's very feature-rich with a lot of dungeons, bosses, artifacts, simple quest system, etc. New stuff comes out every month. [0] - https://www.slightlymagic.net/forum/viewtopic.php?f=26&t=30489 https://www.slightlymagic.net/forum/viewtopic.php?f=26&t=304...
- falsaberN1 3y agoNot quite, there was another developer that quietly made a lot of work in the time he was around, after Grimm just vanished shortly after those posts, and basically left the entire thing in an usable state for later. Unfortunately he left after a series of personal tragedies that rendered him unable to function for a while. That guy never gets any credit which is rather sad. I really don't know how he still has a will to live after all that has happened to him.
- j_m_b 3y agoGreat to see Forge making the front page! It runs on mobile too and the UI is frankly better than the desktop version. Definitely install a snapshot version so that your client stays up to date. The bots can play surprisingly well with agro and even control decks, but can't play any kind of combo... Or even assemble Tron. I've even used this to play local network games against other players. If they had a global server that allowed you to find games, it would be the perfect way to play MtG.
- 7373737373 3y agoDoes a bot league exist yet for MtG?
- 7373737373 3y agoWould it be possible to apply MuZero to this?
- mdaniel 3y agoI went looking for MuZero implementations in order to see how, exactly, they interact with the game space. Based on this one, which had the most stars in the muzero topic, it appears that it needs to be able to discern legal next steps from the current game state https://github.com/werner-duvaud/muzero-general/blob/master/games/connect4.py#L155 https://github.com/werner-duvaud/muzero-general/blob/master/... So, I guess for the cards Forge has implemented one could MuZero it, but I believe it's a bit chicken and egg with a "free text" game like M:TG -- in order to train one would need to know legal steps for any random game state, but in order to have legal steps one would need to be able to read and interpret English rules and card text
- piyh 3y agoI was floated the idea of doing an AI competition for Sabberstone, the open source rules engine for Hearthstone. Even though Hearthstone is hugely limited in game complexity compared to MtG, building an interface for a program to take actions in Sabberstone and evaluate boardstates is not trivial.
- bhickey 3y agoHow does it compare with Xmage and cockatrice?
- archargelod 3y agoIt's similar to Xmage, but with heavy leaning into PVE. There are around a dozen original modes to play against AI opponents: Adventure (à la Shandalar 1997), Quest, Planar Conquest, Gauntlet, Puzzles. Plus practically every somewhat popular format, including digital-only: Momir from Shandalar, Drafts, Sealed, Cube, Commander, Oathbreaker, Brawl, Archenemy, etc. etc. There's a way to setup online multiplayer games, but no hubs or rooms like in Xmage. It's also somewhat under-utilised feature and therefore not so well supported. I haven't actually tried cockatrice, but I believe it's more like a tabletop simulator, e.g. you have to shuffle, draw, and play the game almost manually? Forge is completely automatic like Xmage, Shandalar and Magic Online. It also could be a fun way to learn the rules of the game.
- khaki54 3y agoIs the adventure mode like that old Microprose Magic the Gathering game? My brother and I loved playing that as kids!
- footlose_3815 3y ago[flagged]
- graphe 3y agoSaid which MTG player?
- Supermancho 3y ago[flagged]
- gpm 3y agoIn no comments on this page, and nowhere on the linked page, is java mentioned. Your theory would imply that someone has made a chatgpt bot with some sort of knowledge of how to navigate github's structure to find relevant facts... just to farm worthless HN karma. I think it's far more likely someone just doesn't like java...
- Supermancho 3y agoForge is written in java. Java is mentioned in the User Guide -> FAQ https://github.com/Card-Forge/forge/wiki/Frequently-Asked-Questions https://github.com/Card-Forge/forge/wiki/Frequently-Asked-Qu... Worthless HN karma? Thats subjective...HN karma does have some first order effects you havent considered. I will leave it at that. People do more for less reward every day, regardless. I think reddit or some no name forum would be a better testing bed, so I will stick with my belief that it is farming (poorly)
- gpm 3y agoI know forge is written in Java (I checked that before writing my comment). How do you propose a chatbot would find out about that though? It seems to me that it would have have a scraper that takes in not just existing comments, and the page itself, but that follows links on the page to discover more "interesting" information. That just seems like an unlikely thing to do. Not only is it unnecessary work, but most context in links would lead to less relevant generated comments, not more relevant ones....
- Waterluvian 3y agoOh this is a gold mine for me. Recently I’ve wondered how games architect card game rules. So many rules feel kind of bespoke, so I wasn’t sure if you could implement a sort of logic so that rules become configuration, or if each rule is just a function.
- Daegalus 3y agoYou might enjoy this official article on a bug in Arena rules engine that goes into how they designed their systems. https://magic.wizards.com/en/news/mtg-arena/on-whiteboards-naps-and-living-breakthrough https://magic.wizards.com/en/news/mtg-arena/on-whiteboards-n...
- mdaniel 3y agoThat's interesting, thank you. It seems what's old is new again: I had a lot of contact with CLIPS early in my career but I found that most of the programming tasks weren't heavy rules based as much as CRUD and reporting apps. Given that Forge is in Java, they may enjoy Drools <https://github.com/apache/incubator-kie-drools#readme https://github.com/apache/incubator-kie-drools#readme> (which used to be a JBoss project but I guess has been donated to the Apache Foundation)
- LelouBil 3y ago> Now we come to the other program that we rules engineers spend our time working on, along with the GRE, which is the Game Rules Parser (GRP). This program (written in Python) takes raw English rules text of Magic cards and converts them into one or more CLIPS rules. It's what allows 80% or so of newly written Magic cards to just work in MTG Arena automatically. Wow, didn't even think about this being a possibility! But I guess if they have a very strict dictionary and grammar rules for card effects this kind of thing can work !
- moate 3y agoTons of creatures with only evergreen/deciduous abilities would probably be super easy to template for something to parse, as would most lands. 80% feels “right” as someone who’s done some game design in the tabletop space.
- mdaniel 3y agoIt must be M:TG week, which I think is fantastic! https://news.ycombinator.com/item?id=38646892 https://news.ycombinator.com/item?id=38646892 is the I guess annual(?) repost of the "Magic: The Gathering Is Turing Complete (2019)" paper and then there were some other M:TG threads that may interest those who didn't see them https://news.ycombinator.com/item?id=38525978 https://news.ycombinator.com/item?id=38525978 (I hacked Magic the Gathering: Arena for a 100% win rate) https://news.ycombinator.com/item?id=38533105 https://news.ycombinator.com/item?id=38533105 (Fine-tuning Mistral 7B on Magic the Gathering Draft)
- deleted 3y ago[deleted]
- deleted 3y ago[deleted]
- moxvallix 3y agoIt was actually the turing complete post that reminded me of this project, hence why I posted it here. Honestly surprised it hadn’t really been posted on HN before (afaict from search).
- 7373737373 3y agoHas anyone tried simulating the Turing complete deck? https://youtu.be/pdmODVYPDLA https://youtu.be/pdmODVYPDLA
- mdaniel 3y agoIn case anyone is curious, it uses Scryfall for the card art https://github.com/Card-Forge/forge/blob/forge-1.6.59/forge-gui/src/main/java/forge/util/ImageFetcher.java#L42 https://github.com/Card-Forge/forge/blob/forge-1.6.59/forge-... and I wish they'd offer a torrent (or IPFS) because I can't imagine the amount of bandwidth it must cost them and I would seed the hell out of any such thing Now, one possible reason would be copyright something-something but as it currently stands it's not like one needs to log in to download the card art one at a time, so ... I struggle to think of what risk they're driving down
- araes 3y agoThere are Torrents. They're not offered by the Card-Forge people, yet they're associated with the same website, so they must know about them. https://www.slightlymagic.net/forum/viewtopic.php?f=15&t=18042 https://www.slightlymagic.net/forum/viewtopic.php?f=15&t=180...
- mdaniel 3y ago[dead]
- bitcharmer 3y ago[flagged]
- henshao 3y agohttps://github.com/Card-Forge/forge/pulls https://github.com/Card-Forge/forge/pulls
- bitcharmer 3y agoHow is this link helping?
- deleted 3y ago[deleted]
- freediver 3y agoOh neat, would get us much closer to having a 'best deck simulator' like this: https://www.youtube.com/watch?v=Xq4T44EvPvo https://www.youtube.com/watch?v=Xq4T44EvPvo
- agazso 3y agoI downloaded this and it looks cool and comprehensive, but for me the card artwork is missing. Maybe some server is hugged by HN? Or something needs to be set?
- 542458 3y agoIt’s a bit unintuitive, but IIRC you need to go into the settings and tell it to download the card art. Two reasons for this: 1, copyright and 2, it’s a big download if you get them at full quality.
- agazso 3y agoThanks, I found it in the 'Content Downloaders' menu! It estimates the download time to 6 hours, and it's not because of the size but most likely their server works slowly. And in the meanwhile it does not let you play, well tomorrow then :)
- Marthinwurer 3y agoThere's a setting somewhere to auto download cards when they're seen. That should get you up and running quicker!
- pdntspa 3y agoWow, if this is what I think it was I remember using this to play MTG online vs some friends waaaaaaaaaaaaay back in the day. This was/is a really good alternative to MTGO edit- It is!
- LelouBil 3y agoHere is an equivalent for Yu-Gi-Oh! https://github.com/edo9300/ygopro-core https://github.com/edo9300/ygopro-core I find the CardScript repository very interesting to look at: https://github.com/ProjectIgnis/CardScripts https://github.com/ProjectIgnis/CardScripts And here is the actual game client : https://github.com/edo9300/edopro https://github.com/edo9300/edopro
- mdaniel 3y agohttps://github.com/ProjectIgnis/CardScripts#contributing https://github.com/ProjectIgnis/CardScripts#contributing > Please keep all bug reports and questions on Discord; do NOT open an issue or pull request for this purpose. Yikes : - ( chat streams are where information goes to die
- ryanbigg 3y agoI’ve done some work on something “less serious” in Ruby: https://github.com/radar/mtg https://github.com/radar/mtg I view it as a wide project full of little interlinked code katas. I’ve thought about the card parsing stuff but that’s beyond my ability.
- yowlingcat 3y agoI've played a lot of Hearthstone over the past decade, and one thing that I've loved about it is Battlegrounds, to the extent where I have stopped playing the traditional meta where you have to build actual decks. Battlegrounds is somewhat similar to the draft meta in MtG and YGO where on a turn by turn basis, you get selection of cards to draft, but with a certain economic limit of cards to pull. It corrects for "buying" your way in and instead focuses ELO on ramping correctly and inflects an RTS flavor on the game. I enjoy it a lot and I kinda wonder why such a flavor on gameplay hasn't similarly taken hold of the other classic CCGs. What am I missing or misunderstanding?
- EE84M3i 3y agoThis is cool, but I'm a bit surprised this isn't AGPL.
- THENATHE 3y agoHas anyone actually tried the network multiplayer? I won't have a chance to try this out for a while, but if there is now a great way for me to play actual commander with the MTGA rules engine (for speed and accuracy) with friends I would love this so much. Can anyone share their experiences?
- Yhippa 3y agoWant to play any Commander deck with friends on the cheap? Spelltable + OBS (or any desktop streaming software) + Moxfield in deck playtest mode.
- spartanatreyu 3y agoMan I used to play this engine and Battle for Wesnoth 10 years ago back when I had intermittent internet. I thought the project died, glad to see it's still going!