Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tetris Builder

A single-file browser tool to draw a Tetris board by hand. Pick a tetromino, rotate it, click a cell, and it lands on the grid. Useful when you need a specific board position as a picture rather than as a game: a puzzle to set up, a diagram for a tutorial, a level mockup, a screenshot for a slide.

No install, no build step, no dependency, no network. One HTML file, opened in any browser, works offline.

Un outil d'une seule page pour dessiner un plateau Tetris à la main. L'interface est bilingue anglais / français.

Tetris Builder: a Tetris board being drawn piece by piece, with the piece picker and controls on the right

Try it

Open Tetris Builder, or clone the repository and open index.html. Both are the same file.

What it does

  • All seven tetrominoes, I O T S Z J L, in their standard colours.
  • Rotation in four steps, with a preview of the piece before you place it.
  • Adjustable board height, 5 to 40 cells, on a fixed 10-cell width.
  • A counter per piece, so you can tell at a glance how many of each the drawing uses. That is the part a paint program will not do for you.
  • Undo, a one-cell eraser, and clear all.
  • Right click removes the piece under the cursor.

Controls

Key Action
Click Place the piece
Right click Remove
R Rotate
1 to 7 Select a piece
G Eraser, clears one cell
Ctrl+Z Undo

How it is built

Plain HTML, CSS and JavaScript in one file, drawing to a <canvas>. No framework, no bundler, nothing to install. Around 700 lines, readable end to end, and easy to fork if you want a different grid, different colours or an export button.

Text contrast is checked against WCAG AA: every label on the dark background sits at 4.5:1 or better.

Support

Free, and it stays free. If it saved you some time, you can buy me a coffee.

License

MIT. Tetris is a trademark of the Tetris Company. This is an unofficial hobby tool for drawing board diagrams, with no affiliation to or endorsement by them, and it is not a game.


Keywords: tetris board editor, tetris grid maker, tetromino drawing tool, tetris level designer, tetris puzzle generator, tetris board diagram, tetris position editor, draw tetris shapes online, html canvas tetris, offline browser tool, single file web app, éditeur de plateau tetris, dessiner un plateau tetris.

About

Draw a Tetris board by hand in your browser. Place and rotate tetrominoes on a grid, count the pieces used, undo. Single HTML file, no install, works offline.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages