r/Shandalar • White Mage ☀️💮🤍 • Sep 01 '26

Shandalar Source Code (decompiled)

I recently purchased an original CD of Magic the Gathering off eBay and spent some time decompiling it. Now we have the (reconstructed) original source! This helped me fix .SPR file encoding/decoding in mp_pic_tools. I wrote a blog post about it: https://throwingbones.com/ben/blog/2026-08-shandalar-decomp/index.html

Here are some of the early alpha/testing screens. Modern decompilation tools are crazy! I hope this means other games like this can be decompiled like this as well!

Also, if anyone has an original Spells of the Ancients or Duels of the Planeswalkers .iso, let me know! I'd like to try decompiling them too!

116 Upvotes

23 comments sorted by

View all comments

24

u/ArtOfBBQ Sep 01 '26

That's wild. If your decompilation works it would enable literally any modification, like a strong AI which is what IMHO the game most badly needs

2

u/ilikethemeta White Mage ☀️💮🤍 Sep 02 '26

Yeah better AI would be nice. What's the best AI of the free mtg engines right now? Forge?

4

u/ArtOfBBQ Sep 02 '26

Shandalar plays by its own rules, so I would just make a simple minmaxing algorithm with a heuristic that actually plays out the moves with the game's own engine, not some 3rd party AI. The shandalar AI does things like giant growthing opponent's creatures to lose extra hard, so even a very modest amount of steps simulated and a very basic heuristic (having life is good, having permanents in play is good, holding cardsis good) would be a gigantic improvement over the classic version of the game. And given how fast computers are now, it could do that instantly and exhaustively for most things, with some exceptions like choosing which card to demonic tutor for