{"id":25414001,"url":"https://github.com/xpd54/tetris_game","last_synced_at":"2025-04-22T14:26:57.526Z","repository":{"id":254097883,"uuid":"845367046","full_name":"xpd54/Tetris_Game","owner":"xpd54","description":"Tetris Game in C++","archived":false,"fork":false,"pushed_at":"2024-11-05T11:21:43.000Z","size":5228,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-05T12:35:46.319Z","etag":null,"topics":["2d-game","cpp","game","oops-in-cpp","raylib-cpp","simple-game","tetris-game"],"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/xpd54.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":"2024-08-21T05:39:33.000Z","updated_at":"2024-11-05T11:21:46.000Z","dependencies_parsed_at":"2024-11-05T12:46:47.596Z","dependency_job_id":null,"html_url":"https://github.com/xpd54/Tetris_Game","commit_stats":null,"previous_names":["xpd54/tetris","xpd54/tetris_game"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xpd54%2FTetris_Game","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xpd54%2FTetris_Game/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xpd54%2FTetris_Game/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xpd54%2FTetris_Game/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xpd54","download_url":"https://codeload.github.com/xpd54/Tetris_Game/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250257824,"owners_count":21400802,"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":["2d-game","cpp","game","oops-in-cpp","raylib-cpp","simple-game","tetris-game"],"created_at":"2025-02-16T14:34:18.176Z","updated_at":"2025-04-22T14:26:57.505Z","avatar_url":"https://github.com/xpd54.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tetris Game with raylib\n\nTetris game is built on top of [raylib](https://www.raylib.com/index.html) using C++17.\u003c/br\u003e\n![Tetris](/screenshots/screenshot_1.png)\n\n## Table of Contents\n\n- [Dependency](#Dependency)\n- [Compiling \u0026 Building](#Compiling)\n- [Game Control](#Game)\n- [License](#license)\n\n### Dependency\n\nAs of Oct 2024 whole game is built on mac using C++17 and raylib library. You would need working setup for C++17. I am using [CMake](https://cmake.org/) as buid tool. Instruction for how to install CMake and how to setup C++ is available everywhere so skipping :).\n\n1. [CMake](https://cmake.org/)\n2. [Raylib](https://www.raylib.com/index.html)\n\n### Compiling \u0026 Building\n\nAs it doesn't have static libaray of raylib included. Have to install raylib in system itself. (my first choice of OS was Mac. Will include static lib or dynamic build in upcoming version).\n\n1. Clone the repository.\n2. `brew install raylib` Install raylib in your Mac first.\n   - To install on Linux follow [official guide](https://github.com/raysan5/raylib/wiki/Working-on-GNU-Linux)\n   - TLDR :- Easiest way to do is [install dependency](https://github.com/raysan5/raylib/wiki/Working-on-GNU-Linux#ubuntu) and [build from source](https://github.com/raysan5/raylib/wiki/Working-on-GNU-Linux#build-raylib-using-cmake) using cmake.\n4. Move inside the Repo `cd Tetris`\n5. Create a folder in root folder name `mkdir build`\n6. `cd build`\n7. `cmake .. \u0026\u0026 make`\n   - You set `BUILD_BENCHMARK` `BUILD_TESTS` to build unit test and benchmark (uses googlebenchmark and googletest)\n   - `cmake -DBUILD_TESTS=ON -DBUILD_BENCHMARK=ON .. \u0026\u0026 make` to build both test and benchmark\n   - To run unit test `./Tetris_tests`\n   - To run benchmark `./Tetris_benchmark`\n8. It will create an executable name \u003cb\u003eTetris\u003c/b\u003e which can be run with `./Tetris`\n\nResource of this game (Music, Fonts) are outside the build folder, and paths to load these are relative. To get music and correct font for score copy \u003cb\u003eTetris\u003c/b\u003e executable to root folder and run again.\n\n- `cp Tetris ../`\n- `./Tetris` this should bring music.\n\n##### Testing raylib setup\n\nIf compile and build failed first place to look at is setup of raylib.\ninside root folder \u003cb\u003etests/test_raylib_setup.cpp\u003c/b\u003e follow same bulding process with creating a build folder. Executable \u003cb\u003eTestRayLib\u003c/b\u003e should show following screen.\n![TestRayLib](/screenshots/screenshot_2.png)\n\n## Game Control\n\n- Left Arrow key :point_right: :- To move block left.\n- Right Arrow key :point_right: :- To move block right.\n- Up Arrow key :point_right: :- To rotate the block.\n\n## License\n\n[LICENSE](https://github.com/xpd54/Tetris/blob/main/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxpd54%2Ftetris_game","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxpd54%2Ftetris_game","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxpd54%2Ftetris_game/lists"}