Introduction – Why Tetris®?

 

Well, because it’s simple, it’s fun, and it has almost every element that a game must have, which will give you a good idea of what to do in a game development project. It also has a very simple to make interface design, which for most developers is a very important pro, since we usually suck in making interface design. I know I do.

 

And what are those “elements” that a game must have? Here they are… A game loop, where input is read, input is processed, output is updated, and the victory / loss condition is checked. It also has very simple collision detection. The game loop of a Tetris® is just like this: it reads the user input, to check if he has rotated the block, moved it to the sides, or moved it down; then it processes that input, by making the block rotate or move; then it updates the user interface to show the falling block; finally, it checks if there was a victory (complete line to be cleared) or loss (blocks got to the top of the board). Pretty easy, right?

 

Every game you will ever make will have these elements, so learning the process of making them is really important. Also, some great ideas emerge when you are actually writing the code for these elements, and these ideas will be used for every game after, making the development of more difficult games easier.

 

So, what is lacking in a Tetris® clone? A couple of things, that I will cover in another series of articles, where we will develop other cool games. These things are: more advanced collision detection, a physics model, level design, and the feared AI. Get those together with the elements Tetris® already has and you have (almost) everything a game can have.

 

We should go slowly. Tetris® is enough for now. This will probably be the smaller article of them all, but it will be the only one with a lot of “fluff”. Or maybe the two or three first ones… ;) You know… Talking about development environment and architecture is not something really practical, so it may be a lot of “fluff” too. I hope you all enjoy it anyway. If you want to skip these couple of first articles, nobody is holding you. :) You might consider coming back later, just to check them out and see if you lost something.

 

Oh, almost forgot! Last words, I promise. FINISH YOUR GAME. I know is tempting to make half a Tetris® clone, see it working, and go start something else. Believe me; you will never finish anything if you start acting like that. And it’s nice to have something to show, like a good interface, with help and everything. You will probably never sell your Tetris® clone, but if you really finish it, you can distribute it for free, and people will get to know you, and that’s nice.

 

That’s it. Good luck!