Arkanoid Game
There's a full Breakout in your ComfyUI, and your image is just a passenger
- image
- IMAGE
You're waiting on a 40-step Flux render, the bar is crawling, and somewhere in your graph there is now a fully playable Arkanoid. That's the entire pitch of the ArkanoidNode from ComfyUI-Games, and honestly it delivers. Drop it anywhere in a workflow and you get a 800×1000 canvas widget right in the node body - bricks, a paddle you steer with the mouse, power-ups that rain lasers, the lot. It's a toy, but it's a complete toy, and that's the point.
The trick: the node does almost nothing
Here's the part nobody warns you about. The Python side of ArkanoidNode is a straight pass-through:
def play_arkanoid(self, image):
return (image,)
That's it. All the real work lives in the frontend - web/js/arkanoid.js registers a ComfyUI extension that, when the node is created, injects a <canvas> into the node body and runs the game loop there. So the game exists only in your browser tab. Feed the node into a headless/API run and nothing plays; the tensor just sails through untouched.
Which brings up the one thing you'll get burned on: your input image does not become the game background. The design begs you to assume "I'll feed my AI art in and play on top of it." You won't. The game draws its own starfield. The image input is a placeholder so the node sits legally in a graph - wire it to your last VAEDecode and the game won't care.
Inputs and outputs that matter
The info_schema is almost insultingly small:
- Input:
image(IMAGE, required) - passed through unchanged. - Output:
IMAGE- the exact same tensor.
That's the whole surface area. Nothing to configure on the Python side; all the actual settings - difficulty (easy/medium/hard), lives, ball speed - are handled inside the canvas widget itself. The one thing worth knowing is that the game persists its state: it POSTs {"score": …, "level": …} to ComfyUI's own server at /arkanoid/highscore, which writes arkanoid_highscore.json into the pack's folder. Score is genuinely saved between sessions.
Installing ComfyUI-Games
This is one of six games that ship in the same pack, so one install gets you all of them. Either use ComfyUI Manager and search for ComfyUI-Games, or:
cd ComfyUI/custom_nodes
git clone https://github.com/GraftingRayman/ComfyUI-Games
Then restart ComfyUI. There's no requirements.txt, no model downloads, no torch dependencies - it leans on aiohttp, which ComfyUI already ships. This is about as dependency-light as custom nodes get.
Common issues
- The image looks untouched. Working as intended. It's a passthrough; play the game in the canvas widget.
- High scores vanish after an update. They're plain JSON files in
custom_nodes/ComfyUI-Games/. Git-pulling a new version can wipe them, and if the folder isn't writable the POST silently fails. - Keyboard shortcuts go weird. Arkanoid installs global key listeners; if your game and ComfyUI fight over arrow keys, it's that.
- Six red "Node Loaded" lines at startup. The pack prints one per game. Annoying, harmless.
Small, readable, zero-dependency, and it kills exactly as much time as you let it. If you're going to lose a generation cycle to something, it might as well be this.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |