{"id":16323666,"url":"https://github.com/im-rises/tetrissfml","last_synced_at":"2025-06-11T09:33:10.453Z","repository":{"id":58946597,"uuid":"534703286","full_name":"Im-Rises/TetrisSFML","owner":"Im-Rises","description":"Tetris game made in C++ 17 with SFML lib","archived":false,"fork":false,"pushed_at":"2023-02-19T19:51:41.000Z","size":18649,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-14T15:16:43.706Z","etag":null,"topics":["cpp","game","sfml","tetris"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Im-Rises.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-09T15:39:13.000Z","updated_at":"2023-05-10T17:07:07.000Z","dependencies_parsed_at":"2024-11-06T16:52:37.560Z","dependency_job_id":null,"html_url":"https://github.com/Im-Rises/TetrisSFML","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Im-Rises%2FTetrisSFML","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Im-Rises%2FTetrisSFML/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Im-Rises%2FTetrisSFML/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Im-Rises%2FTetrisSFML/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Im-Rises","download_url":"https://codeload.github.com/Im-Rises/TetrisSFML/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Im-Rises%2FTetrisSFML/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259239102,"owners_count":22826859,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpp","game","sfml","tetris"],"created_at":"2024-10-10T22:55:22.668Z","updated_at":"2025-06-11T09:33:10.430Z","avatar_url":"https://github.com/Im-Rises.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TetrisSFML\n\n\u003cp align=\"center\"\u003e\n      \u003cimg src=\"https://user-images.githubusercontent.com/59691442/183268126-b3d19e66-8f2d-463a-805e-ae6ef7cc6c01.png\" alt=\"cmakeLogo\" style=\"height:60px;\"/\u003e\n      \u003cimg src=\"https://img.shields.io/badge/C%2B%2B-00599C?style=for-the-badge\u0026logo=c%2B%2B\u0026logoColor=white\" alt=\"cppLogo\" style=\"height:60px;\"/\u003e\n      \u003cimg src=\"https://user-images.githubusercontent.com/59691442/183268128-6f1a7773-a77c-4635-9a61-daa72c023915.png\" alt=\"sfmlLogo\" style=\"height:60px;\"/\u003e\n\u003c/p\u003e\n\n## Description\n\nTetris game written in C++ using SFML 2.5.1 lib available for windows, linux and macOS.\n\nThe project is compiled using CMake and VisualStudio compiler version.\n\n## Features\n\n- Difficulty increasing depending on your score\n- Clearing row animation\n- Tetromino preview display\n- Soft and Hard drop\n\n## Images\n\n| Screenshot 1                                                                                                      | Screenshot 2                                                                                                      |\n|-------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------|\n| ![screen1](https://user-images.githubusercontent.com/59691442/190564537-cb0d0ee4-4135-4062-8834-8774519d4253.png) | ![screen2](https://user-images.githubusercontent.com/59691442/190564542-cd332ed3-c960-4a27-a2d0-3cb06307a4e8.png) |\n\n## Quickstart\n\nTo download the game, you can click one of the icons below depending on your operating system, or you can click the\nrelease section of the GitHub page.\n\nDepending on you `operating system` you will need to install some libs, they are installed differently depending on your\nsystem, please follow one of the section below `Windows` or `Linux` or `MacOs`.\n\n\u003e **Note**\n\u003e Be carefully you have the Text Font `Arial` in the folder `font` next to the executable. Without it the game will\n\u003e crash.\n\n### Windows\n\n\u003ca href=\"https://github.com/Im-Rises/TetrisSFML/releases/latest\"\u003e\u003cimg src=\"https://img.shields.io/badge/Windows-0078D6?style=for-the-badge\u0026logo=windows\u0026logoColor=white\" alt=\"cmakeLogo\" style=\"height:40px;\"/\u003e\u003c/a\u003e\n\nFor Windows users you don't need to install the libs, you just need to be carefully that you have the\n`*.dll` next to the `TetrisSFML.exe` or the game won't start.\n\nOnce everything is set up by you can start the game by double-clicking the executable of typing the following\ncommand next to it:\n\n```bash\n.\\TetrisSFML.exe\n```\n\n### Linux\n\n\u003ca href=\"https://github.com/Im-Rises/TetrisSFML/releases/latest\"\u003e\u003cimg src=\"https://img.shields.io/badge/Linux-FCC624?style=for-the-badge\u0026logo=linux\u0026logoColor=black\" alt=\"cmakeLogo\" style=\"height:40px;\"/\u003e\u003c/a\u003e\n\nFor Linux users, you need to install the SFML lib, to do so type one of the following commands:\n\n```bash\nsudo apt-get install libsfml\n```\n\nor if you're a developer and want to compile the game, please install this version of SFML:\n\n```bash\nsudo apt-get install libsfml-dev\n```\n\nThen you can start by double-clicking the executable of typing the following command next to it:\n\n```bash\n./TetrisSFML\n```\n\n### MacOs\n\n\u003ca href=\"https://github.com/Im-Rises/TetrisSFML/releases/latest\"\u003e\u003cimg src=\"https://img.shields.io/badge/mac%20os-000000?style=for-the-badge\u0026logo=apple\u0026logoColor=white\" alt=\"cmakeLogo\" style=\"height:40px;\"/\u003e\u003c/a\u003e\n\nFor macOS users you will need to install Brew, please follow the instruction in the link below:  \n\u003chttps://brew.sh\u003e\n\nOnce it is installed, you can type the following command to install SFML.\n\n```bash\nbrew install sfml\n```\n\nThen you can start by double-clicking the executable of typing the following command next to it:\n\n```bash\n./TetrisSFML\n```\n\n## Game controls\n\nTo play the game, you need to use your keyboard with the following controls:\n\n| Description              | Keyboard |\n|--------------------------|----------|\n| ←                        | ←        |\n| →                        | →        |\n| Hard Drop                | ↑        |\n| Soft Drop                | ↓        |\n| Rotate clockwise         | S        |\n| Rotate counter clockwise | D        |\n\n## Project architecture\n\n~~~\nTetrisSFML\n├── .github\n|  ├── labels.yml\n|  ├── release.yml\n│  ├── workflows\n│  │   |── cmake.yml\n│  │   |── codeql.yml\n│  │   |── cpp-cmake-publish.yml\n│  │   |── cpp-linter.yml\n│  │   |── dependency-review.yml\n│  │   |── flawfinder.yml\n│  │   |── greetings.yml\n│  │   |── label.yml\n│  │   |── msvc.yml\n│  │   |── stale.yml\n├── font\n|   ├── arrial.ttf\n├── TetrisSFML\n|  ├── bin\n│  │   |── *\n|  ├── include\n│  │   |── GLFW\n│  │   │   |── *\n|  ├── lib\n│  │   |── *\n|  ├── CMakeLists.txt\n|  ├── global.h\n|  ├── main.cpp\n|  ├── Tetris.cpp\n|  ├── Tetris.h\n|  ├── Tetromino.cpp\n|  ├── Tetromino.h\n├── .clang-format\n├── .editorconfig\n├── .gitaattributes\n├── .gitignore\n├── CMakelists.txt\n├── README.md\n~~~\n\n## Compilation\n\nTo compile the game, the first thing you need to do is installing a C++ compiler:\n\n- Visual Studio (MSVC)\n- Mingw\n- ...\n\nYou also need to install Cmake:  \n\u003chttps://cmake.org\u003e\n\nOnce your environment is set up, you can download the project. If you have the Visual Studio compiler then you\ncan directly go to the operating system step compilation in the other case follow, the SFML installation in\nthe `SFML` section below.\n\n### SFML\n\nFollow this guide to install SFML on your distribution.  \n\u003chttps://www.sfml-dev.org/tutorials/2.5/\u003e\n\nI compile the program with Visual Studio CMake compiler, so I downloaded the `Visual C++ 15 (2017) - 64-bit` v2.5.1.\nIf you want to compile the app with Mingw, be sure to download the `GCC 7.3.0 MinGW (SEH) - 64-bit` v2.5.1 and replace\nthe folders `bin`, `include` and `lib` by the mingw one.\n\n### Windows\n\nWindows users can directly compile the project by typing the following command at the project root folder:\n\n```bash\ncmake .\n```\n\n### Linux\n\nFirst thing to do is to install CMake, type the following command to install it.\n\n```bash\nsudo apt-get install cmake\n```\n\nYou also need to install the SFML lib. Type the following command at the project root.\n\n```bash\nsudo apt-get install libsfml-dev\n```\n\nYou are now able to compile the project. Go to the project root and type the following command:\n\n```bash\ncmake .\n```\n\n### MacOs\n\nFor macOS user, you should install brew package manager by following the instructions in the link below:  \n\u003chttps://brew.sh\u003e\n\nThen type the following command to install cmake:\n\n```bash\nbrew install cmake\n```\n\nand this one to install SFML\n\n```bash\nbrew install sfml\n```\n\nYou are now able to compile the project. Go to the project root and type the following command:\n\n```bash\ncmake .\n```\n\n## Github-Actions\n\n[![flawfinder](https://github.com/Im-Rises/TetrisSFML/actions/workflows/flawfinder.yml/badge.svg?branch=main)](https://github.com/Im-Rises/TetrisSFML/actions/workflows/flawfinder.yml)\n[![CMake](https://github.com/Im-Rises/TetrisSFML/actions/workflows/cmake.yml/badge.svg?branch=main)](https://github.com/Im-Rises/TetrisSFML/actions/workflows/cmake.yml)\n[![CodeQL](https://github.com/Im-Rises/TetrisSFML/actions/workflows/codeql.yml/badge.svg?branch=main)](https://github.com/Im-Rises/TetrisSFML/actions/workflows/codeql.yml)\n[![Microsoft C++ Code Analysis](https://github.com/Im-Rises/TetrisSFML/actions/workflows/msvc.yml/badge.svg?branch=main)](https://github.com/Im-Rises/TetrisSFML/actions/workflows/msvc.yml)\n[![Cpp Cmake Publish](https://github.com/Im-Rises/TetrisSFML/actions/workflows/cpp-cmake-publish.yml/badge.svg?branch=main)](https://github.com/Im-Rises/TetrisSFML/actions/workflows/cpp-cmake-publish.yml)\n[![cpp-linter](https://github.com/Im-Rises/TetrisSFML/actions/workflows/cpp-linter.yml/badge.svg?branch=main)](https://github.com/Im-Rises/TetrisSFML/actions/workflows/cpp-linter.yml)\n\nThe project is set with a set of different scripts:\n\n- flawfinder : to check the code for security flaws\n- CMake : to compile the project\n- CodeQl : to check quality of the code\n- Microsoft C++ Code Analysis : to check the code for security flaws\n- Cpp Cmake Publish : to publish the project on GitHub\n\n## Documentations\n\nMain documentation:  \n\u003chttps://www.youtube.com/watch?v=vkS1fY_UTyg\u0026t=1s\u003e\n\nTetris Wiki:  \n\u003chttps://tetris.fandom.com/wiki/SRS\u003e\n\nSFML:  \n\u003chttps://github.com/SFML/SFML\u003e\n\n## Contributors\n\nQuentin MOREL :\n\n- @Im-Rises\n- \u003chttps://github.com/Im-Rises\u003e\n\n[![GitHub contributors](https://contrib.rocks/image?repo=Im-Rises/TetrisSFML)](https://github.com/Im-Rises/TetrisSFML/graphs/contributors)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fim-rises%2Ftetrissfml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fim-rises%2Ftetrissfml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fim-rises%2Ftetrissfml/lists"}