/braille-blocks

A tetris variant meant to be played on a refreshable Braille display

Primary LanguageJavaScript

This is braille-blocks, a Tetris variant (no automatic block falling) meant to be played with an 8-dot, 18-cell refreshable Braille display.

Each column of the 10x20 playfield is represented by a Braille character. The left and right walls of the playfield are also represented. In each column, the height of the topmost block is represented by the Braille for space (zero height), the digits 1-9 and 0 offset down from their letter equivalents representing height 1 to 10, or the letters A through J not offset, representing height 11 to 20. The bottom two dots of each cell will be active if the next piece to be dropped is currently hovering over that column.

To the right of the playfield, the 90-second countdown timer is displayed, followed by a graphical dot representation of the current piece to drop.

Press the space bar to change to alternate display mode. In alternate display mode, the playfield is five characters wide, and each dot represents a block on the playfield. Four lines of the playfield are shown at a time, and the lines which are shown can be moved up and down with the up and down arrows. The score is also displayed between the playfield and the timer in this mode, since there is extra space.

Control keys:

  • left arrow: move piece left
  • right arrow: move piece right
  • up arrow: rotate piece clockwise, or in alternate display mode, page the view of the playfield up.
  • down arrow: drop piece, or in alternate display mode, page the view of the playfield down.
  • space bar: start game, and toggle alternate display mode on and off.
  • keys 1 2 3 4: set how many lines to move up and down at a time in alternate display mode.
  • z key: show a non-braille display line below the braille line on screen.

To play without downloading, go to this link: http://airhadoken.github.io/braille-blocks