SkillAgentSearch skills...

Rbtris

Tetris game powered by Ruby2D

Install / Use

/learn @Nakilon/Rbtris
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

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

View on GitHub
GitHub Stars63
CategoryDevelopment
Updated1y ago
Forks6

Languages

Ruby

Security Score

85/100

Audited on Jul 11, 2024

No findings