Tetris Clone from Gamedev.net, converted to more Object Oriented code and added my own features.
If running outside of MSVS, make sure to copy the blocks.bmp, tetris.mp3, Pieces.json and Highscores.json into same directory as where .exe is being run from (ie. Debug/Release).
- First and foremost, Gamedev.net where I found the basic game code written by Evil_Greven here: https://www.gamedev.net/forums/topic/192483-tetris-clone-in-an-hour-with-c/ .
- @voporak5 for his help and guidance (via Intro to Game Programming course at CGSpectrum ) in making the game code more OO and which patterns would work.
- @gabime for spdlog library.
- @nlohmann for nlohmann/json library.
- Powerglove for their super awesome Tetris Metal Theme.
- Game Programming Patterns website.
- TheCherno's C++ YouTube Series.
In addition to the basic game, the following basic features were added:
- Scoring
- Highscores read and written to JSON file. (shown via F1).
- Game Pause (pause key).
- Tetris music
- Pieces data read from Pieces.json file (possible to design custom pieces).
- Singleton Pattern for Game object.
- Observer Pattern for scoring.
- Simplified State Machine for handling user input for highscores vs regular game input.
- Bit Blitting for bitmap textures (blocks and text).
- Collision detection.
- Implementing 3rd party libraries:
- spdlog for nice formatting in log output (file or stdout).
- nlohmann/json for simple and robust JSON reading and writing.
- Windows Application Programming.
- MP3 Audio Playback.