
I wanted to talk a little about the history of this blog. I started this blog about 14 months ago and I remember being disappointed when I was only getting 5 hits a day. Nowadays I’m up to 100+ hits a day which is phenomenal. I remember wondering should I stop blogging, since no one was reading it.
I’m probably the worst blogger ever. I don’t read any blogs and I write about the boring subject of computer programming, although I try to spice it up by talking about Magic, lol. Most blogs talk about too many subjects or at worst, just random thoughts. I try to make this blog very focused, just programming and Magic. A few “miracle” articles combine both topics, but sometimes I’ll write about just programming or Magic. Hopefully my programming articles are still interesting to my non-coding readers. I think programming is fun, so I try to make it sound fun.
This blog is also an extension of my program MTG Forge. It is a “behind the scenes” about programming Magic cards and artificial intelligence. MTG Forge has gotten people working on their own projects, which was one of my goals. Part of me feels like a “crazy scientist” that writes this program in his kitchen (I don’t have a basement) and then unleashes it on the world.
I like giving away the source code even though I know it isn’t really usable to anyone else. Trying to modify some else’s code is like trying to add a chapter into a book that is already written, you can do it, but it is very hard.
Hopefully small pieces of my code, like the Card and SpellAbility classes, make sense. So you don’t have to understand the whole project, you can just look at some of the pieces and use them in your own project if you want to. And if you are very brave you can look at CardFactory. CardFactory is so horrible, weird, and messy that it is almost beautiful.
In a way CardFactory is my masterpiece. A normal piece of code, called a “method”, is 5 to 30 lines long. CardFactory has a method that is more than 10,000 lines long. CardFactory actually creates all the cards, so a lot of “voodoo” happens there. Each planeswalker is about 200 lines of code. That is why MTG Forge currently only has
3 out of
5 planeswalkers, they are a ton of work.
So in closing, I wanted to thank you (the readers) for making this blog successful. At last count MTG Forge has been downloaded more than 10,000 times, but this number is 6 months old. (I don’t have a way to track the number of times my program is downloaded.) And hopefully one day I’ll build an AI (artificial intelligence) that is unbeatable ;)