A kind of mixture between Tetris & Jewel
Project by David Perrai & Brice Thomas, 2013
Graphics by Maxime Dolo
Firstly, we have a 14x12 grid :
Then, we filled randomly the first four rows from the bottom with four types of element :
2 | 4 | 3 | 1 | 4 | 1 | 2 | 3 | 4 | 2 | 1 | 3 |
4 | 2 | 1 | 3 | 1 | 4 | 2 | 3 | 1 | 2 | 4 | 2 |
1 | 2 | 4 | 3 | 1 | 2 | 4 | 1 | 2 | 3 | 4 | 1 |
2 | 4 | 3 | 1 | 4 | 1 | 2 | 3 | 4 | 2 | 1 | 3 |
Now, the player can swap two adjacent elements (from left, right, top and bottom).
Every time a swap occurred, each rows are pushed up and the first one is filled with new elements.
When the last row contains at least one element during two turns, the game is over.
Thus, the player must remove elements by forming groups of at least three elements of the same type. Some examples :
1 | 1 | 1 |
1 | 1 | 1 |
1 | ||
2 | 2 | |
2 | ||
2 | ||
2 | ||
2 | 2 | |
Each elements removed give points to the player.
Project written in C++ (100%)
Using SDL, SDL_image, SDL_TTF & SDL_gfx libraries
Use Makefile to compile.
Prototype version, main goals (100%)
- gravitational matrix
- grid class & main methods
- check grid behavior
- game engine
- screen classes (state pattern)
- gridmode classes (strategy pattern)
- element classes (decorator pattern)
- engine singleton
Final version, let there be light (100%)
- full graphics
- gui
- elements animation