A userscript that overlays a rainbow ghost piece on tetr.io showing the AI's best placement for the current piece. Mod made by @Ja3farr.
- Install Tampermonkey or Violentmonkey in your browser.
- Open
tetrio-ghost-helper.js, click Raw, your userscript manager should prompt to install. - Go to https://tetr.io/ and start a game (Zen is easiest to try). A rainbow panel will appear top-right.
The script wraps requestAnimationFrame so it can read pixels from tetr.io's WebGL canvas after the frame is rendered but before it's composited. From those pixels it decodes the 10×20 playfield, NEXT queue, and HOLD slot, runs a Pierre Dellacherie-style heuristic with 1-piece lookahead, and renders the best placement(s) as a translucent overlay aligned to the playfield.
- Ghost ON / OFF — toggle the overlay.
- +1 Look / No Look — toggle 1-piece lookahead (slightly slower; better placements).
- × — close the panel and detach the script.
MIT.