Tuesday, May 22, 2007

MTG Forge History

Many times I’ve downloaded a cool program and I wanted to learn more about it. Most of the time I can’t find any information describing why a program exists, it just does. This article will describe the history and motivation behind MTG Forge.

It all started when I found the cool 1996 Magic game by MicroProse called Duels of the Planeswalkers, http://www.the-underdogs.info/game.php?id=1550. It let you play against the computer, which lessened the humiliation of defeat. It featured about 640 cards from Alpha, Legends, Antiquities, The Dark, and 4th Edition. It was also way ahead of its time by letting you play against other people over the Internet, much like a free Magic Online. It had all the classic power cards and I was in awe when I first saw them in action. Nevinyrral's Disk, Ancestral Recall, Ali from Cairo, Time Vault, Berserk, and Black Lotus are all very broken. I could tell that these cards were overpowered, but also really fun. I played constructed (all the cards) constantly for about a month or two straight.

I was getting bored, but I found an option to play sealed deck. I randomly clicked on it to see how it was, but I wasn’t expecting anything too great. I loved it! I got to choose my cards from a random card pool and then face off in a 32 player tournament. It was great. Those early card sets were not designed with sealed in mind so I had to use 2 tournaments packs and 4 boosters in order to construct a viable deck, anything less was unplayable.

The MicroProse game was great. The computer acted intelligent enough and would sometimes surprise me by combining the effects of two different cards. I enjoyed playing land destruction and other nasty decks, without actually annoying another person. Sealed deck was really fun, but I wish I could change the card set that it used. Some cards I just got tired of seeing and I wanted to delete them.

I started programming just to see how far I could get. I started by programming code that represented a card and then phase etc… The project just got bigger and bigger and now it is around 700kb of source code. The source code is about the length of a 300 page novel. I programmed in Java because that is my best language. I am sort of surprised the whole project didn’t collapse, and it did a few times. When nothing worked, those were the hardest days. I programmed MTG Forge mainly for myself and I am my own biggest fan. I play it almost every day.

As a side note, the old MicroProse game has a few hidden easter eggs. Sid Meier is listed in the credits of the game. And if I run the old Magic game and Apprentice at the same time, Apprentice shows the mana symbols instead of just letters in the cost of the card. The font file named is “Magis___.ttf”


Nanocore said...

I too liked the Microprose game and wanted the ability to add cards or change the tactics, but my interest in programming a MTG game was to be able to run it on my platform of choice, Linux. So, I went down the same path, using Java, creating my own game. I was more interested in the AI part of it so I focused my effort on the core part of and its interaction with the AI. I don't do graphics, so the eye appeal and lack of time eventually pushed my creation on the shelf. And then I stumbled upon your project and am thinking if I have the time to re-visit some of my old ideas and whether they could fit into this new shell.

I anxiously await version 2...

Anonymous said...

I'm an Adobe Flex developer and I'm interested in porting the code to Actionscript so it can be played inside a browser and possibly talk to a database. Some simple features I'm thinking about adding are integrated user accounts and community reviewed decks, etc.

I'll have to see how easy the version 2 code will convert to AS though.

I'm anxiously awaiting version 2 as well...

Forge said...

The hardest thing in programming Magic is trying to allow for anything. Some of the mechanics like suspend are tricky. Trample, first strike, and abilities that trigger when they do damage are all nightmares that I'm trying to program.

I'm trying to program all of the rules in a rules engine, so if I have to change everything, I only have to change the engine, but there is alot of specifics that have to be worked how.

MTG Forge can run in a browser as an applet with minimal modifications, since it uses regular Java.

No one commented on my Black Lotus joke, it doesn't have any flavor next and definitely doesn't have a tap symbol on it.