{"id":15552136,"url":"https://github.com/sonodima/nxtetris","last_synced_at":"2026-07-17T05:31:24.909Z","repository":{"id":50255522,"uuid":"417421027","full_name":"sonodima/nxtetris","owner":"sonodima","description":"Cross-platform, over-engineered XTetris built in ANSI-C","archived":false,"fork":false,"pushed_at":"2022-09-15T07:33:16.000Z","size":10021,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-03T12:22:02.817Z","etag":null,"topics":["cross-platform","game","game-development","ncurses","tui","xtetris"],"latest_commit_sha":null,"homepage":"https://sonodima.github.io/nxtetris","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/sonodima.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}},"created_at":"2021-10-15T08:15:34.000Z","updated_at":"2022-09-15T15:46:31.000Z","dependencies_parsed_at":"2023-01-18T08:30:33.384Z","dependency_job_id":null,"html_url":"https://github.com/sonodima/nxtetris","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonodima%2Fnxtetris","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonodima%2Fnxtetris/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonodima%2Fnxtetris/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonodima%2Fnxtetris/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sonodima","download_url":"https://codeload.github.com/sonodima/nxtetris/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246126735,"owners_count":20727595,"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":["cross-platform","game","game-development","ncurses","tui","xtetris"],"created_at":"2024-10-02T14:09:17.530Z","updated_at":"2025-10-18T19:08:21.857Z","avatar_url":"https://github.com/sonodima.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eNXTetris 🕹️\u003c/h1\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://badgen.net/badge/lang/ANSI-C/grey\"/\u003e\n  \u003ca href=\"https://sonodima.github.io/nxtetris/\"\u003e\u003cimg src=\"https://badgen.net/badge/docs/Doxygen/red\"/\u003e\u003c/a\u003e\n  \u003cbr\u003e\n  \u003cbr\u003e\n\u003c/div\u003e\n \n\u003e Cross-platform, over-engineered XTetris written in C\n\n## Features\n\n- [x] Single-player game mode\n- [x] Two-players game mode\n- [x] Player vs. AI game mode _(AI algorithm is still really basic)_\n- [x] Piece control with keyboard and mouse\n- [x] 2D CLI graphics abstraction\n- [x] Audio output support\n\n## Controls\n\n### Menu(s)\n\n* \u003ckbd\u003eKB_RIGHT\u003c/kbd\u003e - Confirm\n* \u003ckbd\u003eKB_LEFT\u003c/kbd\u003e - Exit / Back\n* \u003ckbd\u003eKB_UP\u003c/kbd\u003e, \u003ckbd\u003eKB_DOWN\u003c/kbd\u003e - Menu navigation\n\n### Game\n\n* \u003ckbd\u003eKB_LEFT\u003c/kbd\u003e, \u003ckbd\u003eKB_RIGHT\u003c/kbd\u003e - Rotate the tetromino\n* \u003ckbd\u003eKB_UP\u003c/kbd\u003e, \u003ckbd\u003eKB_DOWN\u003c/kbd\u003e - Change tetromino\n* \u003ckbd\u003eMOUSE_X\u003c/kbd\u003e - Position the tetromino in the x-axis\n* \u003ckbd\u003eMOUSE_LEFT\u003c/kbd\u003e - Drop the current tetromino in the board\n\n## Build\n\n\u003cb\u003eRequirements:\u003c/b\u003e\n\n- cmake\n- make\n- pkg-config _(macOS/Linux only)_\n\n---\n\nBuilding the program is done by running the following commands:\n\n```bash\ngit clone --recursive https://github.com/sonodima/nxtetris\ncd nxtetris\n\nmkdir -p build/release\ncd build/release\n\ncmake ../.. -DCMAKE_BUILD_TYPE=Release\nmake\n```\n\nThe output executable will be named `nxtetris` and will be placed in `build/release`.\n\n\u003cb\u003eNOTE:\u003c/b\u003e The binary needs to be shipped with the `resources` folder _(which is copied to the build directory at\ncompile time)_ in order to work properly. _(without it the audio won't play)_\n\n### Windows Compilation\n\nDue to ncurses limitations, on Windows MinGW is required to compile the program.\u003cbr\u003e\nYou can use the following command to generate the Makefile for MinGW:\n\n```bash\ncmake ../.. -DCMAKE_BUILD_TYPE=Release -G \"MinGW Makefiles\"\n```\n\n## Libraries\n\n- [ncurses:](https://invisible-island.net/ncurses) terminal control library, enabling the construction of text user\n  interface (TUI) applications.\n- [portaudio:](http://www.portaudio.com/) cross-platform audio I/O library.\n- [libsndfile:](http://www.mega-nerd.com/libsndfile/) audio file I/O library.\n\nAll the libraries are managed by [vcpkg](https://vcpkg.io/) and are automatically obtained during the build process.\n\n\u003cb\u003eNOTE:\u003c/b\u003e The first build will take a while since all the libraries need to be downloaded and built.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsonodima%2Fnxtetris","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsonodima%2Fnxtetris","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsonodima%2Fnxtetris/lists"}