Rbtris
Tetris game powered by Ruby2D
Install / Use
/learn @Nakilon/RbtrisREADME
Tetris game in less than 200 lines of code

Controls
ARROWS
R to restart
P or Space to pause
Installation
bundle install
bundle exec ruby main.rb
For Linux you might need to read the Ruby2d installation notes.
TODO
- [ ] projetion of the piece on the bottom
- [x] SRS canonical rotation
- [ ] SRS wall kicks
- [x] scoreboard stored at
$HOME/.rbtris - [x] ability to fall down only partially
- [x] ability to hold UP (just for fun)
- [x] Mutex stdlib class
- [ ] autoresize to screen?
- [x] option to restart
- [ ] cheats for testing purposes
- [x] canonical increase of speed
- [x] holding LEFT and RIGHT
- [ ] canonical scoring
- [ ] see next piece
- [x] pause key
- [ ] window size configuration?
- [ ] canonical music
- [ ] restore controller support?
- [ ] color scheme configuration
- [ ] boss key
- [ ] compile and publish?
Notes
By default ruby2d looks for a font only in one system directory -- this is why ruby2d dependency here was forked and patched a bit to support sourcing from the working directory (and $HOME/Library/Fonts).
It can't be compiled to binary right now because of using a Mutex class that is not in MRuby.
It's hard to continue fitting it into 200 lines but I want to add more features -- ~~maybe I'll make a "300-LOC" branch~~ there is now 250-loc branch that has the "next piece" displayed.
Cool font is Press Start 2P from Google Fonts.
Related Skills
node-connect
345.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
106.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
345.9kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
345.9kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
