Crates.io | sxtetris |
lib.rs | sxtetris |
version | 1.4.0 |
created_at | 2024-06-22 08:50:30.592115+00 |
updated_at | 2025-08-23 17:55:10.312689+00 |
description | A terminal Tetris game |
homepage | |
repository | https://github.com/shixinhuang99/sxtetris |
max_upload_size | |
id | 1280279 |
size | 3,314,503 |
A terminal Tetris game written in Rust, built with ratatui and tokio.
https://github.com/shixinhuang99/sxtetris/assets/31186725/1eb95c10-e57e-4239-8142-95800e1afca8
brew tap shixinhuang99/brew
brew install sxtetris
cargo install sxtetris --locked
You can install sxtetris
from the AUR by using an AUR helper:
paru -S sxtetris
Download pre-built binaries from the latest releases.
105x45
iTerm2
GNOME Terminal
Windows Terminal
sxtetris
To see the save file location:
sxtetris --show-save-path
All audio files are located in the src/global/assets
directory. Files from freesound have been trimmed for optimal gameplay experience.
File | Author | Source |
---|---|---|
bg_music.mp3 | Stable Audio | Stable Audio |
game_over.wav | themusicalnomad | FreeSound |
lock.wav | Mellau | FreeSound |
menu.wav | Christopherderp | FreeSound |
move.wav | aphom000 | FreeSound |
clear.mp3 | B_Lamerichs | FreeSound |
If you encounter the following error when using cargo install
:
The system library `alsa` required by crate `alsa-sys` was not found.
The file `alsa.pc` needs to be installed and the PKG_CONFIG_PATH environment variable must contain its parent directory.
The PKG_CONFIG_PATH environment variable is not set.
HINT: if you have installed the library, try setting PKG_CONFIG_PATH to the directory containing `alsa.pc`.
Run these commands and try installing again:
sudo apt-get update
sudo apt-get install libasound2-dev
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/lib/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig
This project is an open-source implementation of Tetris designed to run in the terminal. Tetris is a registered trademark, and all rights belong to its respective owners. This project is intended solely for educational and research purposes and should not be used for commercial purposes.
By using this project, you agree to use it exclusively for non-commercial educational and research purposes. The developer assumes no responsibility for any infringement of intellectual property rights.