Friday, September 14, 2012

Small Update

You can get the latest version of Forge from the forum.

Here is a list of programs that are similar to Forge and let you play Magic: The Gathering against the computer or other players.

Keep on tapping,

Saturday, April 28, 2012

That’s All Folks

A king was nervous about the future and asked a wise man, “Tell me something that is always true” and the wise man replied, “Change”.

This will be the last entry for this blog. It has been a great five years but I think it is time to be moving on. Forge is a huge success as well as this blog. Currently the blog gets 650 hits a day which is phenomenal for a niche topic. Writing a regular post of 150-300 words takes around 90 minutes and is always a challenging.

I created Forge and this blog when I was at my lowest point in life and did not know what to do with my time. Thankfully my real life has been improving so now I have less free time. I haven’t programmed anything in more than a year but I will probably start another programming project sometime when another itch needs to be scratched. (Most open source projects start with somebody having an itch.) I have some interesting ideas about another trading card game videogame but no concrete ideas or code.

Thanks for reading. You the readers have improved my life. Thanks for playing Forge and thanks for reading this blog.

Keep on tapping,

--Forge will continued to be developed and new cards will be added. New versions of Forge can be download from

--I will try to updat list of all Magic programs because it seems to get a good number of hits.

Tuesday, April 17, 2012

Deck Editor and Schlemiel’s Algorithm

Years ago I wrote Forge’s first deck editor. It didn’t do anything fancy and you couldn’t search for anything. You really didn’t need to “search” much because Forge only had a couple hundred cards. I did work hard on the deck editor’s “sort” feature which let you sort cards by name, type (instant, creature, etc…), mana cost, power or toughness. (In my mind “sort” was good enough, so a separate search function wasn’t really needed.)

(From the upcoming set Avacyn Restored)

But there was a problem. As more cards were added, the deck editor’s sort function became slower and slower. At first I guessed that it was a problem with Java but it wasn’t. I thought I was implementing “sort” correctly and that was as fast as it could be. (Later, I learned the correct way to sort things using Java’s JTable.) This “slow sort” problem plagued Forge for a couple of years until the nice developers totally revamped the deck editor and now it is awesome. The new deck editor is actually fun to use because it works so well.

The old deck editor basically used a “n squared” solution that grows very quickly. For example, to sort 100 cards it might take 2 seconds, 200 cards - 10 seconds. But to sort 300 cards took 15 seconds. As you can see, the sort times grows fast very rapidly. For a funny explanation of the same thing, real Joel Spolsky’s explanation of Shlemiel the painter below.

(Begin Quote)

Shlemiel gets a job as a street painter, painting the dotted lines down the middle of the road. On the first day he takes a can of paint out to the road and finishes 300 yards of the road. "That's pretty good!" says his boss, "you're a fast worker!" and pays him a kopeck.

The next day Shlemiel only gets 150 yards done. "Well, that's not nearly as good as yesterday, but you're still a fast worker. 150 yards is respectable," and pays him a kopeck.

The next day Shlemiel paints 30 yards of the road. "Only 30!" shouts his boss. "That's unacceptable! On the first day you did ten times that much work! What's going on?"

"I can't help it," says Shlemiel. "Every day I get farther and farther away from the paint can!"

(End Quote)

Basically it is hard to know if you have the “right solution” when you code. A program can be fine until you add that one feature that just breaks everything. Life and computer programming are both comprises. The perfect solution does not exist.


Joel Spolsky is great and each article has more computer info than my 4 years in college studying computers. Read his blog and be enlightened. For those people who can follow some short code segments in C, Joel talks more about C and Shlemiel here.

Joel Spolsky’s book’s “Joel on Software” and “More Joel on Software” are the best things that I have ever read. They are more readable (and edited) than his blog.

Joel Spolsky’s Blog

Tuesday, April 10, 2012

New Version

Forge has 500 new cards for a total grand total of 10,524 cards. Over 10,000 cards is just insanely crazy but it is more fun than a 100 pound ice cream.

Some of the new cards include:

Mirror Strike (3W, Instant) – “All combat damage that would be dealt to you this turn by target unblocked creature is dealt to its controller instead.” The card sounds cool and should win a few games.

Pulse of the Forge (1RR, Instant) – “Pulse of the Forge deals 4 damage to target player. Then if that player has more life than you, return Pulse of the Forge to its owner's hand.” The “pulse cycle” is great and repeatedly dealing damage is fabulous. This card has “card advantage” written all over it.

Fist of Suns (3, Artifact) – Let’s you pay WUBRG for any card. This card screams screams, “Please build a deck around me.”

Gomazoa (2U, 0/3, Creature) – “Defender, flying and Tap: Put Gomazoa and each creature it's blocking on top of their owners' libraries, then those players shuffle their libraries.” A blue creature that just won’t die and lets you skip combat phases, cool.

The extra crispy avenger,


Forge version 1.2.6

Download (45 MB) – Windows and Linux

Download (46 MB) – Mac

Forge requires Java

To uncompress bz2 files you can use Winzip or the free, open source program 7z.


Many people helped with this version. A special thank you goes out to them.

Chris H
Friar Sol
Jeff Wadsworth
Max mtg

Monday, April 2, 2012

Playtesting and Forge

A while ago a reader mentioned that he used Forge to playtest new decks. I thought it was an interesting comment because I never considered that idea. Forge has around 75% of all of the cards in standard (75% is just a guess) but I see how it could be a good playtesting tool. Any cards that Forge did not have, you use the developer menu and change mana and life points as needed.

(Dark Ascension token)

Forge is a good playtesting tool because you can see a variety of game situations. It is hard to look at a card at face value and say, “This card is good” or “This card is bad”. Your experience with other similar cards may make you think that a card is good or bad but without using that specific card in a game, you cannot be sure. I have built decks around cards that I thought were great but the playtesting showed me the truth.

Forge lets you test and build decks very quickly which helps you playtest many different decks. Since the AI is very basic, you can play whole games in 5 or 10 minutes. A real life 1-on-1 game would usually take 30 minutes or longer.

On a side note, Magic has a very influential pro-tour and there could be a market for a program that lets players playtest decks. The application could be stupid and only a “virtual tabletop” that did not understand the rules. The application would allow users to make decisions for both players and at the most basic level the application would not need any AI. A simple AI like Forge would not be too difficult to code but it would need to be able to use all of the cards in standard.

Just a humble guy,

Monday, March 26, 2012

Should the AI Bluff When Attacking?

Bluffing is not a major part of Magic but it is still exists. By “bluffing” I mean attacking as if you held a card like Giant Growth. You can even bluff with cards like Shock by attacking your opponent’s 4/4 with your lowly 2/2. Usually I would wait until the 4/4 attacks and then block it with your 2/2 and kill it with Shock but every game as different specific tactics and situations.

“When should you bluff?” I tend to never bluff when attacking because I never know if the AI will block or not. Obviously if I think that a bluff would win me the game, I will try it. Otherwise I might only bluff with small creatures if I had plenty of other creatures on the board.

The AI is interesting because it plays multiple matches and it could keep track of the number of times that a bluff failed or succeeded. The AI could bluff more or less as needed. In order for the AI to act like a human player the bluff should work 50 to 75 percent of the time (although this is just a rough guess). The AI could bluff all of the time but that would be very stupid. (The goal of the AI is to make it act like a human player and force you to make hard combat decisions.)

Right now the AI never bluffs on purpose. The AI may bluff accidentally because combat is very complicated (but very fun). I am just happy that the AI can play instants during combat, so players are surprised some of the time. For many years I attacked like a madman because I knew the AI never used instants during combat. The AI can also use Counterspell which is always stuns me and makes me momentarily panic.

Feedback Question:
When (and if) should you bluff when playing Magic?


Some games like poker are almost exclusively based on bluffing, which explains why I am so bad at it.

Because of my programming background I never have to ask myself, “Will computers ever evolve, like in the Terminator movies?” because computers are really, really stupid. A computer is just a very fast calculator.

Saturday, March 17, 2012

Nothing New

I usually have a fabulous article to post every Monday but sometimes the well runs dry, aka. I have no idea in the whole universe about what to write. Usually ideas just randomly float into my head, which I think are gold, but other people may have (very) different opinions.

Read some Dork Tower and have a great week.

Monday, March 12, 2012

Cooperation and Why Forge Doesn’t Have Flame Wars

Forge is one big collaboration with people from different countries and languages. All of these people are united in their love for Magic: The Gathering. I am guessing that Forge has had at least 100 people submit Java code to the project and at least 50 have made substantial contributions.

I presume most people add a card or two that they really wanted. Forge is a random collection of cards, so you can never be sure which cards Forge has or doesn’t have. Most people also have a favorite card, or three, or a card that they enjoy using. Even if the card is usually crappy but has the chance to win the game once in a while. Crappy cards aren’t crappy 100% of the time, so it is ok for Forge to incorporate them.

Forge also does not have forum flame wars. Everybody acts like an adult (which is rare of the internet) and avoids the usual, “I’m right and you’re wrong” arguments that are never ending. This subject reminds me of an old joke about two guys who both moved. One guy says, “My new neighbors are nice but my old neighbors were nice also.” The other guy says, “I hate my new neighbors because they are just like my old neighbors.” Basically if you are nice, people will respond nicely and vice versa if you are angry.

All open source software is a testament to cooperation and the joy of working with your fellow man. Other types of media such as books and movies do not lend themselves to collaboration as well as software (for whatever reason). And many types of open source projects are not videogames. Maybe amateur videogames tend to be not very good or maybe open source videogames need more of a singular vision to be successful, who knows?

I am still surprised that people want to work on Forge because it was started by an amateur programmer using an old PC. Truthfully I started Forge because it was cheaper for me to code new cards versus buying them and I still get a thrill when I use rares like Darksteel Colossus, Elvish Piper, and Wrath of God because I never owned them in real life.

I am also happy that Forge’s simple AI does not detract from the fun factor. Making that early decision was a tough one.


Monday, March 5, 2012

New Version – Dark Ascension and 10,000+ cards

Forge is awesome. It has 154 Dark Ascension cards and a total of 10,382 cards, which is crazy. The new user interface looks great and when you start Forge, it has a nice, modern menu (which is shown below).

And here is a screenshot of the actual game. (Click to see a larger image.)

To get to the deck editor, choose Utilities from the left-hand menu and then you will see the Deck Editor. Most people will also want to use the Import Pictures (also found in Utilities) which imports cards pictures from a previous version of Forge. You can use the Import Pictures feature if you don’t want to move the files yourself.

I do not have much to add, so here is what Chris. H. posted:

(Begin Quote)
We have reached a new milestone. All Modern legal sets are at least 80% complete and all Extended legal sets are at least 90% complete.

A number of bugs were found and fixed. The mana pool bug which caused crash reports was fixed. We also have a performance fix relating to static abilities. These reported bugs were also fixed: Avatar index bug, Quest opponent refresh, Avatar switch bug and Win streak (stats) not refreshing.

The UI has a few new features including the option to pick an avatars from a collection of pictures. This can be accessed from the Settings -> Avatars tab.

The organizational structure of the /res/decks/ folder has been improved and we now have these four subdirectories:


You can now buy PreCon decks, Starter packs, Tournament packs and Fat packs from the quest mode card shop.

The Forge archive includes a readme.txt file and we ask that you spend a few minutes reading this file as it contains some information that may prove usefull. We do tend to update this file at times and you should quickly read this file and look for new information for each and every new release. Thank you.

We have changed the archival format used for the Forge distributions from ".zip" to ".tar.bz2". There are utilities for Windows, Mac OS and the various *nix's that can be used to decompress these ".tar.bz2" archives. We recommend that you decompress the Forge archive into a new and unused folder.

Some people use the Windows application 7zip. This utility can be found at Mac users can double click on the archive and the application Archive Utility will launch and extract the archive. Mac users do not need to download a separate utility.

(End Quote)

Just another Pro-Tour wannabee,


forge-1.2.4.tar.bz2 (33.2 MB, at - for Windows, Linux

forge-1.2.4-osx.tar.bz2 (34.2 MB, at - for Mac

Forge Forum – in case you need to ask questions or confess your addiction to Forge :)

Download Java - Forge requires Java 6

Many people helped with this version. A special thank you goes out to them. (Attempted to list names alphabetically):

Chris H
Friar Sol
Jeff Wadsworth
Max mtg
Rob Cashwalker

Magic has some great artwork. Here are a few Dark Ascension cards that Forge has.

Monday, February 27, 2012

Dark Ascension is Coming

I thought about posting a new version of Forge today but the most recently released version on the forums does not download the new Dark Ascension card pictures, and I know that everybody loves to use and abuse new cards. Hopefully a new version of Forge will be posted to the forums on March 2nd but that is only a tentative date and it may change. The next version will have at least 149 cards from Dark Ascension.

The Forge team is very happy to announce that Forge now supports more than 10,000 cards, which is a major milestone. Here is the announcement that they posted on the forum. (This relates to the 02-03 version which does not download the Dark Ascension card pictures.)

{begin quote}

The Forge team is very proud to announce that more than 10,000 cards are now available for play! This is an impressive amount, particularly considering that as of October 2011, the official game has produced 12,246 unique cards.

Rares, the creator of Forge, generously shared his work as an open source project about five years ago. Since then, dozens of people have contributed their talents to evolve the codebase to the point it's reached today: a game engine that can successfully juggle 10^5 10^4 unique cards, available for free.

The honor of writing the 10,000th card has gone to an unnamed hero, which is suitable since it's these brave code warriors that make the game what it is. A well-deserved thanks to anyone who has volunteered their time to script, test, maintain, report, code, suggest, debug, design, or in any way contribute to this project.

A special thanks in particular to the CCGH web site and its administrators for providing us with the Forge forum, and to the unsung team of people who quietly maintain the servers which assist this project in one fashion or another.

With this in mind, we move onward and upward. Enjoy your next game of Forge!

{end quote}

I sarcastically asked, “What will the developers do once Forge supports every card in existence?” and someone replied, “Start debugging”. That was a joke but it was very funny. Although I know Forge can be buggy, it is also awesome. (I have heard much the same thing about Elder Scrolls V: Skyrim, awesome but buggy.)

Dark Ascension
I presume most people know about but I will mention it anyways. is similar to Gatherer but has very, high-quality scans of Magic cards. You can view a visual spoiler for Dark Ascension at here.

If you want to download all of the card pictures and peruse them offline, link (26 MB).

Deck Forum
Forge has a separate forum just for decks and you can upload and download a ton of new/different decks. The “New Quest Deck” post allows people to post decks and then adds them to the list of opponents for Forge’s quest mode. You can also download a different set of files for sealed and draft, which is called a “cube”. Another person posted the top 8 decks from the Grand Prix Lincoln 2012 as well as 256 decks from “Building on a Budget” which is posted weekly on

That is about it. Have a grape (great) week :)


I have started to get into miniature wargaming, which is pretty cool. I love making strategic decisions and talk about a genre that really needs a good videogame. Awhile ago I played a ton of Advance Wars for Gameboy Advance. While it isn't really a “wargame”, it is still an excellent game.

Tuesday, February 21, 2012

Magic: The Gathering For iPhone and Android

(I don't have much to say this week.)

The Wagic project lets you play Magic on your iPhone or Android.

Wagic works on Windows, Linux, the nokia N900 (maemo), the Nokia N9 (meego), Android (tablets and phones), iOS(iPhone/iPad/iPad2) and the Sony PSP (Wagic does not require you to hack your PSP).

Wagic Link

Saturday, February 11, 2012

Browsing Forge’s Source Code – Part Deux

Similar to the line that Morpheus said in the Matrix, “Some things changes and some things don’t.” Much of Forge has been changed and improved but the core foundation is the same. Card objects, hold one or more SpellAbility objects. Today I will be looking through the “creature cardfactory” that handles the weird, oddball abilities that are not scripted. (Scripting only cares about multiple cards with the same ability.)

The creature cardfactory is relatively small, only 2,600 lines including blank lines, and handles around 69 creatures. (You can view the Java source code here.) The first creature is one that I recognize “Force of Savagery”. It is an enigmatic 8/0 creature that only costs 2G. Obviously the key is that it needs to be pumped up by Glorious Anthem or similar cards.

The code below is just for the AI and checks to see if Glorious Anthem or its green cousin Gaea's Anthem is in play. The problem is that checking for specific cards is that new cards are added/created all of the time.
if (cardName.equals("Force of Savagery")) 
  final SpellAbility spell = new SpellPermanent(card) 
    public boolean canPlayAI() 
      final CardList list = AllZone.getComputerPlayer().

      return list.containsName("Glorious Anthem") 
          || list.containsName("Gaea's Anthem");


Drekavac is the next card that I recognize. I originally added it but the code has been updated as Forge has changed. Drekavac (2B, 3/3) the drawback is that you must discard a non-creature card. In the code that tells the AI not to play this card I see this comment.

I could never get the AI to work correctly, it always played the same card 2 or 3 times

This takes me back because that is my original comment. Now I know how to fix the problem but the AI probably should not play cards with a drawback anyways, since it cannot tell when the drawback is tactically prudent or not. I always liked using Drekavac for some reason.

The next card is Phylactery Lich. It is a pretty cool rare that gets you a 5/5 indestructible creature for only BBB if you own an artifact. The code here only deals with letting the player choose an artifact. Elsewhere, where static or state effects are checked, the code checks to see if the artifact with the phylactery counter is destroyed. The AI for this card is simple and just makes a “sanity check” to see if the computer has an artifact on the battlefield.
public boolean canPlayAI() 
return (!AllZone.getComputerPlayer()
Sky Swallower is another card that I coded back in the day. Sky Swallower is another situational card that the AI plays badly. I thought it might be a good card but I don’t think I have ever won a game with it. I know it could win a game. In the code there is my original comment that has not been updated.

// TODO - this needs to be targeted

Technically Sky Swallower’s ability is targeted and Forge does not target the opponent because it makes the code a few lines shorter. I know that Magic has a few cards that give protection to a player but years ago, I knew that Forge did not have any of those cards. I used Forge’s excellent deck editor to search for cards that give protection to players and I could not find any but I could be wrong.

While these were just small snippets of code, it felt good to look at actual source code.


“Part deux” is taken from one of my favorite movies, “Hots Shots: Part Deux”. Deux is French for “two”.

Tuesday, February 7, 2012

Just a Bit of Humor

I can't think of anything to write about, so here is something to distract you. Dork Tower is great. The picture is a little small but you can see it full size here.

Monday, January 30, 2012

Browsing Forge’s Source Code

Source code is great. Similar to a the relation between a cooking recipe and a cake, source code “creates” a program. I like the think of source code as the secret internal guts of a program that you never get to see. I have not looked at Forge’s source code in a long, long time, so I’m just going to randomly pursue it. (You can view the source code yourself here.)

(A class is just a bunch of related Java statements.)

I’m always drawn to the class Card but I see the class ColorChanger so I’m going to look at that first. ColorChanger is very basic but it lets you change the color of any card. ColorChanger also uses a time stamp to keep track of the color changes. Below is the most important method. I understand most of the code but bIncrease is interesting because it changes the time stamp. I think the time stamp is important because two cards may change all of the other card colors in the game but the card that is played last takes priority and “overrides” any previous cards.
public final long addColorChanges(final String s, final Card c, final boolean addToColors, final boolean bIncrease) 
   if (bIncrease) 

   this.globalColorChanges.add(new CardColor(new ManaCost(s), c, addToColors, false));
   return CardColor.getTimestamp();
The Card class is used everywhere in Forge and I have fond memories of creating it from scratch. Currently the Card class is 8,800 lines long (including blank lines) and you can view it here. The most important methods are:

getName() : returns String
isSick() : returns boolean – Does this creature have summoning sickness?

getOwner() : return Player – Who owns this card?
getController() : return Player – Who is currently using this card?

getManaCost(): returns String represent the cost of this card. Even though not every card has a mana cost, most cards do.

One of the longest methods is hasProperty() which covers many additional sources of information like does this card have one color or multiple colors? Is this card double-faced? Is this card a flip card? Is this card enchanted? Is this card haunted by any other cards?

hasProperty(final String property, final Player sourceController, final Card source)

And finally I will look at IPlayerZone, which implements all of the zones in Magic: battlefield, graveyards, exiled, in hand, or in your library. IPlayerZone is technically an interface and just outlines what methods it need and does not contain any working code. IPlayerZone is just a thin wrapper for ArrayList and has the regular, boring methods like add(Card), remove(Card), size(), isEmpty(), and contains(Card) : boolean. I did not directly create IPlayerZone but I indirectly created it. To easily filter cards I created a different, yet similar class named CardList which easily lets you do common task such as find all elves or Forests in play.

Much of Forge has changed since I worked on it and just browsing through the source code, Forge looks very impressive. Just looking at individual classes is just a glimpse of the program’s overall form and structure but it shows just how many details have to be laboriously spelled out so the computer can process them. And yes I do understand that Forge has its share of errors but Forge really is a work of art.

Forge is the best videogame ever created. (Well next to Minecraft…)

Humble scribe,

Just in case my previous link doesn't work, you can view Forge's Java source code here.

Tuesday, January 24, 2012

Magarena – Great AI

Magarena is a great, great program. It lets you play Magic against the computer and has almost 2,000 cards. The outstanding feature of Magarena is that the AI is as smart a human opponent. The AI will punish you for mistakes and will play unexpected instants during combat. While Forge’s AI is a nice stroll through the forest, Magarena feels more like all-out war. You can also scale back the AI and limit the time that is had to “think ahead” to only a couple of seconds which makes the AI good but not great.

Magarena also has a great user interface which is skinnable and supports different themes. The cards are artfully displayed so you can easily glance at your hand or the battlefield and see everything. Combat is beautifully handled with a separate combat mode that graphically shows which creatures are attacking and blocking.

Magarena also highlights the cards in your hand that you can play and if you double-click, it has an auto-pay feature. In case you made a mistake, it even has a fabulous undo button. Magarena also highlights cards that have an activated ability that you can use. Also when attacking and blocking, Magarena highlights which creatures you can attack with and block.

Magarena lets you choose between a cheating or non-cheating AI. The difference is that the cheating AI can see the cards in your hand. I randomly play against both cheating and non-cheating opponents and I cannot see a discernable difference. Basically the cheating AI is a little bit better than the non-cheating.

Magarena has a difficult (even grueling) AI and a powerful, candy-covered user interface. (10 MB) (Windows,Linux) (10 MB) (Mac)

Magarena Forum

Just a random programmer,

--Magarena is written in Java, which I think is very cool. Java (can be) great.

--If I understand Magarena’s docs, the strongest AI is the “monte carlo (cheat)” option. This algorithm is very sophisticated. As I understand monte carlo, it plays many thousands of games using random moves and then chooses the move (branch) that generates the best outcome for the AI and the worst outcome for the opponent. Easy to explain but hard to code.

Saturday, January 21, 2012

Late Again

Robin - "Holy Cheesecake Batman, no new article today."

Batman - "Yes, this seems to be the work of the nefarious Sweet Tooth".

I'll try to post a new article sometime Monday.

I just watched an 70's Batman cartoon and it was hilariously bad, though entertaining enough that I watched the whole episode. It even had the mischievous Bat-Mite, who causes more chaos than he solves. The show had horrible puns throughout. It was similar to a really good b-movie and I just couldn't look away.

Tuesday, January 17, 2012

New Version

(Sorry for not publishing anything on Monday.)

New versions of Forge are great and taste like fresh buttered movie popcorn, hmmm… There are 200 new cards and the user interface has gotten a major overhaul. (And yes Forge now has Serum Powder.)

Chris. H. posted:

(Begin quote)

A new UI is being developed and it will take some time before it is finished. Forge is somewhat unstable at this time as the new user interface is a work in progress.

The first step was to update the battlefield window. The second step was to update the New Game window and this section still needs some work. We want to get constructed node and then quest modes working first and will then try to get the draft and sealed modes working again afterwards. While most of this work has now been done there are still a few areas that are not finished and you may discover a bug or two.

Enjoy the new work and be patient as this part of the project moves forward. For now, only "Constructed" mode is far enough along to be considered reasonably stable. Quest mode, Sealed and Draft are somewhat stable and you should be able to use these three modes without too many bugs and issues being noticed. Please report all bugs and issues that you notice.

(End quote)

Working on a new user interface is very complicated. It takes weeks to create a new user interface and mere minutes to criticize. I’m not saying that all criticism is bad but try to balance your criticism with a little bit of praise. A good balance points out the good and as well as the bad.

Listing some positives also helps the author know what he is doing right, which is as important as highlighting the negatives. If you only list negatives, the author will probably just give up out of frustration.

Some of the new cards look very cool.

Bogardan Phoenix (2RRR, 3/3, flying) returns to the battlefield after dying once.

Culling Scales (3, artifact) - "At the beginning of your upkeep, destroy target nonland permanent with the lowest converted mana cost" if there is a tie, target any one of them. This card is just dying to be the center of a creatureless blue control deck.

Doubling Cube (2, artifact) - "3, tap: Double the amount of each type of mana in your mana pool". Deckbuilders, start your engines.

Vish Kal, Blood Arbiter (4WBB, 5/5, flying, lifelink) and some cool an ability to grow larger, if you sacrifice a creature. Everybody loves flying fatties.

Serum Powder (3, artifact) - If you have Serum Powder in you hand, you can exile all of the cards in your hand and then draw the same number of cards, which is an unique ability. In my option, Serum Powder seems like it would improve most decks.

Dreams of TCG videogames,

Maybe it was good that I didn't post anything Monday since a new version of Forge was released yesterday. Sometimes being late is a good thing :+)


01-16 is when this version of Forge was first posted to the forums.

Link - Forge 01-16 (Windows, Linux) 33 MB and can be unzipped with Winzip or 7-Zip (free, open source)

Link - Forge 01-16 (Mac) 35 MB and can be unzipped with with Keka

Download - Card Pictures (160 MB) - These are some of the low-quality (LQ) card pictures. 

Java - Forge requires Java in order to run

If you have any questions/comments, please post them to the forum.

Reporting Bugs:
Forge is always a work-in-progress. Some cards (and card interactions) are more buggy than others. To report a bug, please follow the instructions here.

These are the people that make Forge awesome. They donate their time, skill, and patience.

Chris H
Friar Sol
Jeff Wadsworth

Monday, January 9, 2012

Thank You

This post is going to be a little bit different. I don’t have bits of Java code to throw at you. This is just a simple article saying, “Thank you for downloading Forge.”

(Card picture from the set - Duel Decks: Ajani vs. Nicol Bolas)

When I started working on Forge I was at my lowest point and very depressed. My college degree was getting me zero interviews and I had recently got myself into a huge heap of trouble which gave me a little too much time on my hands. I knew that I enjoyed programming so I started working on Forge as a hobby. I thought that more than likely no one else will ever see my work but it would at least give me something to do.

Now other people actually contribute code to Forge and I just blog about it. Most open source)projects don’t ever get off of the ground but with Forge there has always been people wanting to work on it, which is exceptionally rare. For some reason open source videogames are rare and I’m glad that Forge is a shining example.

The current developers have to deal with my design decisions and I say “Thank You” because they have done such a good job programming around Forge’s limitations. I created Forge as well as I could but there were gaping holes in my logic and architecture. I am humbled by the fact that they have added so many more cards to Forge than I would have been able to do as individual programmer. Sometimes the group is smarter than the individual (but not always).

I also want to say thanks to you for reading this blog. Most of my life seems like a failure: no job, no girlfriend and I’m 33, but writing for this blog is very satisfying. I get 200 to 300 hits a day which is very impressive considering that I only post one article a week.

If I would have been able to find a job, Forge probably would have never been written. The same thing probably could be said of J.R. Rowling, author of the Harry Potter series. She began writing because she was nearly homeless and didn’t know what to do with her life.

I enjoy telling people that I started a thriving open source project. Creating and working on Forge have been one of the highlights of my life. I would encourage you to try to do something “big” yourself, even if the odds are stacked against you. Even writing this very geeky, niche blog is very rewarding.

Even if I never get a job programming professionally, Forge has given me confidence in my skills.

Humble programmer and writer,


-- I also understand that Forge is far from perfect. I wrote Forge to very flexible but that flexibility makes Forge harder to use. Thanks for powering through and being able to see the beauty of Forge.

--A side note about my recent programming activity. I haven’t written any Java code in three years. I don’t know if it is burnout or just laziness. The main reason that I avoid coding is because it takes so much concentration, which is exhausting. Programming is like doing an extremely, long math problem. If you get the right answer it feels great and when you get the wrong answer, you feel like crap. I try to praise the coders who work on Forge because I know how strenuous it can be. Trying to fix a bug can be like the 3rd circle of hades.

I do enjoy programming and maybe I can prod myself to work on a small project. Trying to tackle a big project is like wrestling with a bear, you might win but it won’t be pretty.

Monday, January 2, 2012

Card Scripting

Card scripting is cool. Instead of having to program cards using Java, which is usually very long and over 100 lines of code, card scripting is shockingly short. Probably 95% of all cards in Forge are scripted.

To look at a specific card’s scripting: first go to the forge folder, then res, then cardsfolder, and unzip “”. Cards like Jace, the Mind Sculptor do not have any scripting and the text file only holds basic information about the card such as its name, cost, card types and starting loyalty.

Shock is always my favorite example.

Text:no text
A:SP$ DealDamage | Cost$ R | Tgt$ TgtCP | NumDmg$ 2 | SpellDescription$ CARDNAME deals 2 damage to target creature or player.
Oracle:Shock deals 2 damage to target creature or player.

Obviously there is a fair about of information here such set information, where each card picture is located as well as its rarity.

A:SP$ DealDamage | Cost$ R | Tgt$ TgtCP | NumDmg$ 2 | SpellDescription$ CARDNAME deals 2 damage to target creature or player.

This is the “scripting” part that creates the card Shock. The scripting restricts the targets to creatures or players, specifies the mana cost, and has some text to show the player.

My 2nd favorite example is Elvish Piper. He isn’t a powerhouse but he is a fun card to use.

Name:Elvish Piper
ManaCost:3 G
Types:Creature Elf Shaman
A:AB$ ChangeZone | Cost$ G T | Origin$ Hand | Destination$ Battlefield | ChangeType$ Creature | ChangeNum$ 1 | SpellDescription$ You may put a creature card from your hand onto the battlefield.

Elvish Piper’s activated ability is far more complicated than Shock’s. The cost is listed as “G T” which seems to mean “1 green mana” and “tap this card”. “Origin$ Hand” means that the creature card is taken from the player’s hand.

Name:Shivan Dragon
ManaCost:4 R R
Types:Creature Dragon
A:AB$ Pump | Cost$ R | NumAtt$ +1 | SpellDescription$ CARDNAME gets +1/+0 until end of turn.

Shivan Dragon’s pump ability is a common effect, “R: Shivan Dragon getes +1/+0 until end of turn”. Any card with a similar ability can be scripted as well.

Name:Shivan Meteor
ManaCost:3 R R
A:SP$ DealDamage | Cost$ 3 R R | ValidTgts$ Creature | TgtPrompt$ Select target creature | NumDmg$ 13 | SpellDescription$ CARDNAME deals 13 damage to target creature.
K:Suspend:2:1 R R

Shivan Meteor is fairly straightforward except that it also has suspend. Shivan Meteor regularly costs 3RR but can be suspended (and played) in 2 turns for 1RR. The scripting for suspend is simple since other parts of Forge handle the actual implementation.

Name:Akroma, Angel of Wrath
ManaCost:5 W W W
Types:Legendary Creature Angel
K:First Strike
K:Protection from red
K:Protection from black

Even though Akroma has a ton of text, all of the text is standard keywords. Cards with activated abilities require more scripting than Akroma.

Name:Day of Judgment
ManaCost:2 W W
A:SP$ DestroyAll | Cost$ 2 W W | ValidCards$ Creature | SpellDescription$ Destroy all creatures.

Name:Wrath of God
ManaCost:2 W W
A:SP$ DestroyAll | Cost$ 2 W W | ValidCards$ Creature | NoRegen$ True | SpellDescription$ Destroy all creatures. They can't be regenerated.

Obviously these two cards are almost clones of each other. Wrath of God is slightly more powerful because creatures can’t regenerate. Obviously Wizards of the Coast thought that Wrath of God was unbalanced and then created Day of Judgment. The Wrath of God scripting includes “NoRegen$ True” which is a minor point but very important. Since Wrath of God is scripted, its mirror Damnation is also scripted and has a different mana cost of 2BB.

Scripting is great and it allows non-programmers to add new cards. The scripting has gotten more complicated and is now a “little language” that does one thing well: create Magic cards.

Average blogger,

Eons long ago while I playing Magic Online, I remember using my Elvish Piper to play Darksteel Colossus (11, 11/11, creature, indestructible, trample). Because they were expensive cards, I only had one copy of each card so I was very happy when I actually got to use them. :+)