Skip to content
/ dotris Public

A mini Tetris clone made with dots

License

Notifications You must be signed in to change notification settings

trevarj/dotris

Repository files navigation

⣼⢠⡄⢤⠄⡤⢠⢀⡤

Mini Tetris made with dots

gameplay

How To Play

Controls

Key Description
Left Arrow Move left
Right Arrow Move right
Up Arrow Rotate clockwise
Down Arrow Soft drop (move down)
Spacebar Hard drop
C Hold Tetrimino / Restore Held
Q Quit game

Terminal Zoom

It is helpful if you increase the font size in your terminal emulator for a "regular" sized game.

Mechanics

Scoring

The scoring is based on the BPS version of Tetris:

Lines Points
1 40
2 100
3 300
4 (tetris) 1200

If the piece used to clear was hard dropped you get 1 point per row added to the point amount.

Each level acts as a multiplier to the above table; i.e on level two, clearing one line is 80.

Levels

Every 10 lines cleared the speed of the falling piece increases by 40% and the grid is wiped.

Troubleshooting

If the pieces are not rendering correctly (weird spacing between dots), you will probably need to install another font that has custom Braille pattern characters.

Some fonts that have decent characters for Tetris pieces: Terminus, Cozette, Spleen

If you use Kitty terminal emulator, these characters will be rendered programmatically, not using the configured font.

Installing

Currently only available through the AUR.

Building

git clone https://github.com/trevarj/dotris && cd dotris

GCC/Clang

$(CC) -lncursesw -Iinclude/ src/main.c src/tetriminos.c src/grid.c -o dotris

GNU Make

make
# or
# sudo make install

Now you can run the dotris binary

./dotris

Development

Generating clangd metadata with bear:

bear -- make