![]() ![]() How to store the pieces and board using matrices (multidimensional arrays).This is how your prototype will look after you finish the tutorial: But right now, let’s focus on the game logic. I’m planning making a second tutorial of how to improve this Tetris clone using sprites, background, effects, etc. All the game logic is isolated from the drawing, so you can expand the tutorial easily. We are going to focus on the game logic, using only rectangle primitives (SDL) for the rendering. However, under Linux, you need libsdl-gfx1.2-dev and libsdl1.2-dev (If you are using Ubuntu you can get them this way: sudo apt-get install libsdl1.2-dev libsdl-gfx1.2-dev) Keys ESC The sourcecode is platform independent and comes with a «makefile». Thanks to lmelior and to Javier Santana, there is a Linux version of this tutorial. In «Release» folder there is also an executable file just in case you want to try it directly. The sourcecode comes with SDL includes and libs ready to compile in Visual C++ Express Edition 2008. I know my English sucks, so if you see some mistakes, please, tell me. ![]() Just enjoy it and leave a comment if you want me to explain something better. And this will take you less than an hour! This is the perfect tutorial for beginners. ![]() We are going to learn how to create a Tetris clone from scratch using simple and clean C++. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |