Dirty Tricks

Started by
0 comments, last by Bacterius 11 years, 1 month ago

Well, I was reading Patrick Wyatt's blog the past week and he cited an article from Gamasutra that list some Dirty Tricks that shipped some games.

I don't know how rude/good it is to post references to blogs here. But the things discussed there are pretty funny.

Worth sharing smile.png

On this topic I will share one experience of mine from college:

We had to create a game in Assembly (our own Assembly language btw smile.png) and apply it to a processor we created using hardware description language and run it on a FPGA board.

Me and my friend were developing a Treasure Hunt kind of game. I remember it clearly... I wrote the moveLeft "method", labeled it and tested.

It worked pretty well, so lets just copy/paste it as moveRight, moveDown, moveUp.

As soon I did this, moveLeft stopped working.

We spent hours trying to debug (there was not much code to debug) and we couldnt find out the problem.

I then had a brilliant idea... lets just swap the code position of moveLeft to moveRight, moveUp or moveDown. Just doing that made moveRight/moveUp/moveDown would break.

We couldn't believe this, the code was breaking because of a specific line (or block). That line, a thousand something, was on strike.

The solution we found: we created a method moveFu** (sorry for the obscenity... college kids) This code didn't do anything and was never called, but we inserted it at the "broken line position". Just like that the movement was fixed.

Programming is an art. Game programming is a masterpiece!
Advertisement

It's not much different from a compiler bug I had a while ago which caused the compiler to fail with an internal error unless a comment was present at some line, which gave rise to painfully misleading comments such as /* do not delete */ or /* fix */

Very irritating indeed.

“If I understand the standard right it is legal and safe to do this but the resulting value could be anything.”

This topic is closed to new replies.

Advertisement