Monday, October 29, 2007

Cut and Paste Cards

The secret to programming is really cut-and-paste. If you have never used cut and paste, you aren’t really using a computer. OK, let’s say I want to program Eternal Witness, what cards have I programmed that are really similar? Well, Gravedigger is 99% the same, so I just copy the code and make a few, small tweaks. Voila, another card is added!! Oblivion Ring and Oubliette are both “brothers from a different color” and I practically used the same code for both cards.

Shock, Char, Psionic Blast, Cackling Flames, Volcanic Hammer, and Firebolt are all essentially the same card, burn is burn. Infest and Pyroclasm both use exactly the same code. Wrath of God and Damnation are perfect twins also. At first glance it doesn’t seem that Terramorphic Expanse and Sakura-Tribe Elder have much in common but these unlikely relatives share the same code. I was curious about cards like Coercion so I also added similar cards like Distress, and Thoughtseize (probably Lorwyn’s most popular chase rare). Mishra's Factory and Blinkmoth Nexus are both lands that turn into creatures, so I copied the code and just changed the specifics like power, toughness, and creature types.

The hardest cards are ones that do something new and weird. Recently I programmed Cranial Extraction, and that code was a little long. It is a really cool card, but it did something brand new, and “brand new” equals “more work.” Each of the planeswalkers are 200 lines because they each had 3 abilities, which is pretty unusual. Incendiary Command was also another tough card, because two of the options let the user choose a target. If Incendiary Command didn’t require any targets, the card would have been a lot easier to program.

Thursday, October 25, 2007

MTG Forge Achievements

The XBox 360 started the phenomenon of achievements. In a nutshell, achievements are bonuses you get for doing specific, difficult actions in a video game. Some achievements are “do 10 one hit kills,” or “score 10,000 points in 1 minute,” things which take some effort to complete.

Hopefully in the future MTG Forge will have a variety of challenging achievements. Here are my top 10 achievements for MTG Forge. See how many you can get.

1. Destroy 6 of your opponent’s creatures with Hex.
2. Use only Relentless Rats and Swamps to win a match.
3. Play a constructed deck with 7 different lands.
4. Win 2 constructed matches with a creatureless deck. +2 if you do this while drafting.
5. Win with a green/blue deck in draft or sealed. (My favorite color combination.)
6. Get a -1/1 creature into play. (Hint: it involves 2 black cards and graveyard recursion)
7. Use Damnation in a draft or sealed game.
8. Win with a Planeswalker, use Liliana Vess for an extra challenge.
9. Destroy an enchantment. Only 2 cards in MTG Forge allow you to do this.
10.Get Sliver Legion into play. +1 if you don’t use a certain green creature.

Monday, October 22, 2007

Programming Lorwyn

MTG Forge has a few cards from Lorwyn, around 12. Many are just plain creatures that haven’t been done before. Thankfully I was able to program 3 planeswalkers: Liliana Vess, Garruk Wildspeaker, and Chandra Nalaar. Vess is definitely the weakest, and Chandra is the strongest, since he can burn your opponent for 10, ouch!!!

The blue planeswalker looks really, really weak and I’m not too interested in him. The white one looks OK, but I’m not over-the-top enthusiastic about him. Planeswalkers seem good as a “I’ll put one or two in my deck to surprise my opponent.” Like legendary cards, having 3 or 4 of them in your library seems like overkill. I have died to them occasionally in sealed games, and to me that is the sign of a good card. As an odd factoid, according to Wizard’s September Magic podcast, planeswalkers were supposed to be Future Sight but they got pushed back, who knew?

Oblivion Ring seemed cool so I added it. Ring is a 2W Enchantment that says “When Oblivion Ring comes into play, remove another target nonland permanent from the game.” Don’t forget that it can get rid of planeswalkers too.

Incendiary Command was an insane card that probably took 2 hours to program. In my phone interview with Wizards, I was asked how I would program Lorwyn’s Command cards so I told them. Later that night I thought it would be cool if I could add one of them to MTG Forge so I picked the hardest one. I’m not sure how good Incendiary Command is, but I do smile thinking of all the time I spent coding it.

Thursday, October 18, 2007

Discard That Card - MTG Forge Update

A new version of MTG Forge is out with 14 more cards, including some Lorwyn cards. Download it from here

For whatever reason the card Thoughtseize intrigued me so I decided to add it to MTG Forge. Thoughtseize is a Lorwyn card that follows Black’s variations on “choosing a card in your opponents hand and making him discard it.” Thoughtseize says, “Target player reveals his or her hand. You choose a nonland card from it. That player discards that card. You lose 2 life.” So for one black mana you get to make your opponent discard something good, that it is worth giving up 2 life. In my short playtesting with it I made my opponent discard a planeswalker that killed me in the previous game. That felt really satisfying seeing Garruk Wildspeaker in the graveyard.

Since I programmed Thoughtsneeze, I might as well add some cards with the same ability because I could just cut-and-paste most of the code. So I fired up Apprentice to look for cards and found that Distress was essential the same card; it only costs B more and doesn’t have any life loss. They say that old Magic cards don’t die, they just are reincarnated. It is intriguing to see a common remade as a rare but maybe it happens all the time.

Ok, back to discard, I also added Cranial Extraction, Coercion, and Distress. So black now has 4 more quality discard spells to add to his arsenal. And just a word of warning, the computer will always remove something good with Cranial Extraction so beware.

Monday, October 15, 2007

Free Software

Writing software and giving it away is an interesting concept. For one thing, (good) software tends to be really hard to write. That is the reason most free software aka “open source” has such horrible user interfaces. User interfaces are hard to get right; they tend to confuse users. For those not “in the know,” open source software could theoretically be modified by anyone, so it is more flexible than Windows which comes in a “one size fits all” variety. This is theoretical because modifying an existing program’s source code is like trying to renovate a freeway without closing it. It is possible to do, but rarely done.

Usually free software is written to “scratch an itch” of the programmer, which is entirely true in my case. I loved the old Shandalar Magic game, as well as the interactive Magic tutorial that came with the starter pack. I wanted to play Magic against the computer, just plain and simple. I also wanted to be able to play sealed and draft games if possible. I also wanted to use modern cards, rather than Shandalar’s Alpha-Legends odd set of cards. Shandalar didn’t have any fatties without horrible drawbacks.

I’ll continue to work on MTG Forge and add a few cards here and there, but basically my itch has been scratched. MTG Forge has been downloaded 8,000+ times and Star City Games has published an article about it. I still have the impossible dream of adding tons more cards and I continue to work on the next version of MTG Forge. I would love to be able to program all of Lorwyn, but I would be doing very good if I could just do 10th Edition. The combat part of the program needs to be rewritten in order to implement first and double strike, which will be a pain. Programming the actual cards isn’t too hard if everything else is done. The cards are just the icing on the cake.

Hopefully this explains a little bit about who writes free software as well as why. I have also explained why free software tends to be buggy and hard to use. Personally, I feel like more free games should be written, since games are fun. I would love to play someone’s version of Marvel/DC’s VS or any other trading card game for that matter. The best way to support your favorite free software project is by sending e-mail, hint hint. I (Forge) can be reached at “mtgrares yahoo com”

Friday, October 5, 2007

Lorwyn Is Here

I feel like Paul Revere, and I paraphrase, “Lorwyn is here, Lorwyn is here.” Well at least the card pictures are here. This webpage has visual spoilers for every Magic set and personally I’ve downloaded them all, just so I can peruse them at my leisure. Unfortunately the Lowryn spoiler isn't up yet, so you have to settle for the random picture spoiler here.

For those of you who want to understand Lorwyn at a glance here is the lowdown. Tribal is back. Elves, goblins, elementals, shapeshifters, giants, and kithkin are all types of creatures that you will see. Each race is comprised of two colors in order to add more variety to the game. For example, there are green as well as black elves. Elementals and shapeshifters are “sub-races” that are sprinkled throughout all 5 colors. A few new sorceries and enchantments also have a creature type like Elf or Goblin. And lest I forget, Planeswalkers are new also. MTG Forge has 3 of these very fine cards and you can download it from http://sourceforge.net/projects/mtgforge/

Every block has some sort of mana fixing, and Lowyn is not an exception. As Ravnica’s duel lands rotate out of Standard, a new cycle takes their place. There are 4 other lands like the one below that reward you for playing tribal decks. (Yes, the lands are rare also. Rare lands are tough on the checkbook.) Who will win, the green Elves of Lockwood Forest or the black zombie Elves of Bayou Canyon? Tune in next time for the exciting result.

Gilt-Leaf Palace
Land
As Gilt-Leaf Palace comes into play, you may reveal an Elf card from your hand. If you don't, Gilt-Leaf Palace comes into play tapped.
tap: Add B or G to your mana pool.

Monday, October 1, 2007

My Job Interview With Wizards

Congratulations to me, I had a phone interview with Wizards of the Coast. I e-mailed Wizards about my program MTG Forge and they seemed a little interested. I hope to be hired as a programmer or at least a computer guy of some type, hey somebody has to keep those printers working.

The two people interviewing me were Elf, the lead programmer of Magic Online, you can look up his real name if you really want to, and some HR lady that had a British accent (sorry I forgot your name). Elf also said that he helped develop Marvel and DC’s VS game, cool. As a joke I wanted to ask Elf did he ever use goblins, but I didn’t have the courage to.

The funniest part was when Elf asked, “Why did you program MTG Forge?” And I said something like, “Well it let’s me play with expensive cards that I don’t own.” Elf sort of laughed and said that Randy Buehler (head Wizards guy) would have a fit if he heard my answer. I was telling the truth though. Who really owns a copy of Library of Alexandria?

All in all the interview went fine and I made small talk by asking how much did it snow in Washington. For what’s its worth, they said Washington was pretty moderate, since it is near the ocean, and it only snows once in awhile, who knew? I live in sunny, sunny, hot, hot Florida, so I think anything above Georgia is north. Hopefully I’ll be hired, but if not, I can always brag to my friends about the time I almost got a job at Wizards.