28436a0cbc5edfbb4f21776f9bc91d8cf5cb20ff
- add rotate_cw/rotate_ccw bindings and display updates in options/controls - refine HUD layout/labels, borders, spacing, and correct lines_cleared output - support customizable tetromino/background colors and background images in live UI
TetriNode
A ComfyUI custom node pack that embeds a playable Tetris game inside a node UI, with image outputs for the live board and next-piece preview.
Features
- Live, playable Tetris inside the node UI
- Board image output and next-piece image output
- Score + lines-cleared tracking (not fully functional yet; current functionality is score = lines cleared)
- Pause/Play and Reset controls
- Seeded piece generation with a standard seed widget available
- Optional keybinding configuration via
TetriNode Optionsnode
Nodes
TetriNode
Main gameplay node.
Inputs
tetrinode_options(TETRINODE_OPTIONS): Custom keybindings for moving left/right, rotating the piece, dropping the piece, play/pause, and resetseed(INT): Seed used for piece sequencebackground_image(IMAGE, optional): Background image for the game board (scaled to cover, then center-cropped)
Outputs
image(IMAGE): current boardstate(STRING): serialized game statelines_cleared(INT)score(INT)next_piece(IMAGE): preview image
TetriNode Options
Optional node that provides keybindings.
Inputs
move_left,move_right,rotate_cw,rotate_ccw,drop,reset,pause: Key bindingscolor_i,color_j,color_l,color_o,color_s,color_t,color_z: Hex colors for each tetromino (e.g.#55D6FF)background_color: Hex color for the board background (ignored when a background image is connected)
Outputs
tetrinode_options(TETRINODE_OPTIONS): Custom keybindings for moving left/right, rotating the piece, dropping the piece, play/pause, and reset
Controls (Default)
Displayed inside the node UI and reflected in the game input handler.
- Move Left:
A - Move Right:
D - Rotate CW:
W - Rotate CCW:
Q - Drop:
S - Reset:
R - Pause:
P
Installation
Installation (preferred)
Install via ComfyUI Manager. Search for "TetriNode" and click install. The node pack is also available on the Comfy Registry site by clicking here.
Installation (alternative)
- Copy this repository into
ComfyUI/custom_nodes/TetriNode/. - Restart ComfyUI.
- Add
TetriNodeand (optionally)TetriNode Optionsfrom the node list.
License
MIT
Languages
JavaScript
82.3%
Python
17.7%


