Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
SFML Blueprints

You're reading from   SFML Blueprints Sharpen your game development skills and improve your C++ and SFML knowledge with five exciting projects

Arrow left icon
Product type Paperback
Published in May 2015
Publisher Packt
ISBN-13 9781784398477
Length 298 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Toc

Building a Tetris clone

Now that we've created a complete game, let's build another one, a Tetris clone. This game is simpler than the previous one and will take less time to build, but is still very interesting. In fact, the internal architecture of this game is really different from the others. This is due to the kind of game that it is: a puzzle. The aim of the game is to fill lines of a grid with pieces made of four squares. Each time a line in completed, it's destroyed, and points are added to the player. Because this is a different kind of game, there are several implications as there is no player or no enemies in this game, only pieces and a board (grid). For this game, I will focus on the game logic only. So I will not reuse the previously made classes such as Action, ActionMap, ActionTarget, Configuration, and ResourceManager to be more concise. Of course, you can use them to improve the proposed source code.

So, to build this game we will need to build some classes...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at AU $24.99/month. Cancel anytime