Wednesday, August 19, 2009

Errors Are a Fact of Life

At last count MTG Forge has a total 1,841 cards and a number of errors. I personally know that some cards are more buggy than others because I programmed them. I tried my best to get Empty the Warrens and Reach of Branches working correctly but they are still buggier than Auntie May's blueberry pie in summer (very buggy).

Those two cards should probably be removed from MTG Forge because they don't work well. Other buggy cards have "state effects" (now called state-based actions) like Glorious Anthem, sliver cards, and Wonder which really slow down the game.

MTG Forge has many bugs because we try to add as many new cards as possible. I was very happy to be able to add planeswalkers. Their only flaw is if the computer has two planeswalkers in play, you can only attack one of them. While this is technically a bug, I still think it is acceptable considering how planeswalkers are generally very powerful.

MTG Forge does not have any kind of error reporting mechanism. If you have an error, such as if the program just says, "The computer is thinking" it means that the AI has crashed and the program doesn't know what to do. Ideally it would be good to save this information to a file, so we would exactly know the problem without the person having to explain the whole situation.

Even though MTG Forge can only implement relatively simple Magic cards, I'm still glad that it supports Baneslayer Angel, Akroma Angel of Wrath, first and double strike, exalted, wither, persist, protection, shroud and morph.

Feel free to report any errors to the forums. We have over 80 pages of errors!!! (The 80 pages represents a considerable length of time and hopefully most of the bugs have been fixed.) I heard that someone pumped Chameleon Colossus so much that its power became negative, which happens when a Java variable "overflows".

p.s.
You can use the computer's activated abilities. I don't consider this a bug and I use it from time to time when the computer has an unfair advantage (aka when I'm losing).

p.p.s.
The only "real" error reporting system is that I throw a RuntimeException if something shouldn't happen. Can this value be negative, if it can't, throw an exception. While this isn't perfect, it works "good enough" to allow me to fix the problem.

p.p.p.s.
There is now a small team that works on maintaining MTG Forge, thanks to dennis, rob, and others who have helped.

8 comments:

DennisBergkamp said...

In the next version, there will be a much nicer error reporting system.

Silly Freak has added some code that will generate an error report which can be saved in text format. This is useful for bugs that cause crashes ("Computer is thinking...").

Shing said...

lol I just tried the same thing with Chameleon Colossus and it just died when i pumped it too much and the thing is that i still had 5x more mana to use too, it was easier than i thought. With experience I know that variable overflows are impossible hard to fix and it's not a real problem anyways.

Silly Freak said...

"computer is thinking" is probably exactly the type of bug that my reporting page can't handle. it happens when there is some infinite loop, which doesn't throw an exception, but doesn't deliver a result. sorry ;)

Silly Freak said...

oh, and it's not state based actions you were talking about but static abilities, but never mind ;)

(SBA are things like destroy on negative toughness, auras attached to nothing etc.)

Incantus said...

Hey Forge,
You might find this article interesting.

It's about how game developers had to add last minute hacks to get their game out the door.

Forge said...

Thanks Incantus. And thanks to all of the guys on the forums who are wrestling with my code, lol.

Owais said...

Computers have brought in major changes in our lives, yet like any machine, they need regular maintenance and upgrade. Many users do not yet realize that. the solution required to fix and prevent these errors from happening are very simple but a person has to know what he is doing before the system actually crashed for good.

Manashark said...

can you try reveillark?