Nodes/ComfyUI-FANTA-GameBox/Play Billiards Game
ComfyUI Node

Play Billiards Game

A playable 8-ball pool table living inside your ComfyUI graph

By IIs-fanta·Created about a year ago·Updated about a year ago· 1
Play Billiards Game

      Play Billiards Game (BilliardsGameNode) is exactly what it says on the tin: a full, playable 8-ball pool table rendered as a widget inside a ComfyUI node. No image generation, no model, no API - you add the node to your canvas, and a billiards table appears inside it that you can actually play. It ships in IIs-fanta/ComfyUI-FANTA-GameBox, a little pack of browser games for ComfyUI (Snake, Flappy Bird, Brick Breaker, and this one). It's a fun/novelty node, the kind of thing you throw into a workflow to show a friend that the tool can do this, or to play while a long batch renders. Which, let's be honest, is a real use case.

      How it actually works

      The Python side is a polite placeholder. BilliardsGameNode declares required: {} and optional: {}, returns no outputs, and its run_game_placeholder method just returns an empty tuple - the comment in the source says the Python side doesn't run the game, the JS does. Everything lives in js/billiards_widget.js (~690 lines), which registers a ComfyUI frontend extension that injects a DOM widget into the node the moment it's created. Inside is an HTML <canvas> (800x400, 2:1 aspect) drawn with the 2D context, plus a hand-rolled physics loop: ball friction at 0.985 per tick, cushion bounces, pocket detection at twice the ball radius, and a dotted shot-path prediction line that projects the cue ball through simulated collisions while you aim. The author even threw in an AI opponent (js/ai_opponent.js). None of it touches the graph, your GPU, or the queue - it's pure browser JavaScript, which is why it costs zero VRAM and zero seconds of generation time.

      Playing the thing

      There are no inputs or outputs to wire, which is the point - you just drop the node on the canvas, resize it, and play. Score and shot count are displayed inside the widget rather than exposed as node ports, so don't go hunting for a "high score" output to feed into an upscale node; there isn't one.

      The controls are mouse-only and pleasant enough: click near the cue ball to start aiming, drag to set direction and power, release to shoot. A semi-transparent path line shows where the cue ball will go and how it'll bounce off the cushions, which makes the physics feel fair instead of random. When you sink all the balls you get a summary screen with your total shot count; hit "Reset Game" (or "开始游戏" / start) to run it back. Because gameWidget.serialize = false in the source, the game state isn't saved into the workflow JSON - it persists while the page is open but resets if you reload ComfyUI.

      Installing it

      The easy route is ComfyUI Manager: search for ComfyUI-FANTA-GameBox (or "FANTA GameBox") and install, then restart ComfyUI. Manual install is just a clone:

      cd ComfyUI/custom_nodes
      git clone https://github.com/IIs-fanta/ComfyUI-FANTA-GameBox.git
      # restart ComfyUI
      

      That's the whole dependency story: there is no requirements.txt, no model downloads, no PyTorch fiddling. You'll find the node under the Games (or "fun") category in the node menu.

      Gotchas

      One trap worth flagging: the README's own install snippet points at a wrong repo (ComfyUI-aki-v1.6/ComfyUI-FANTA-GameBox) instead of the real one at IIs-fanta/.... Cloning that gives you someone else's repo. Use Manager or the URL above.

      Two more practical things. First, it's a frontend-only node, so a stale browser tab is the classic "where is my node" failure - after installing, actually restart ComfyUI and hard-refresh your browser so the extension JS loads. Second, this is the kind of DOM-widget node that ComfyUI's Nodes 2.0 frontend rewrite has been known to break; the pack is a fresh single-commit upload (June 2025), so if the widget doesn't render after a ComfyUI update, that's a compatibility hiccup, not something you did. It's a fun toy, not a workflow backbone - when it breaks, it breaks gently, and you lose a game, not a render.

      Categoryfun

      Inputs (0)

      No inputs

      Outputs (0)

      No outputs