SirtetJS: Game Boy Tetris in Phaser
SirtetJS is a Game Boy Tetris clone written in JavaScript with Phaser.
- Rotate clockwise with
C, counterclockwise withX. - Choose 1 Player on the menu and press
spaceto start. The 2-player option is not supported yet.


Rotation
Rotation is an index into a table of precomputed shapes, following the Nintendo Rotation System. Each piece stores its orientations, and rotating only moves the index:
getCWIndex() {
return (this.index + 1) % this.rotations.length;
}
getCCWIndex() {
let i = (this.index - 1) % this.rotations.length;
if (i < 0) i = i + this.rotations.length;
return i;
}
rotateCW() {
this.index = this.getCWIndex();
}
It builds with Bun and runs from any static file server. Try the live demo, or see the source.