Nodes/Comfy-URN-Arcade-Games/URN Arcade Missile Command
ComfyUI Node

URN Arcade Missile Command

Aim with the mouse, and your queue is done

By Clivey1234·Created about a month ago·Updated about a month ago· 2
URN Arcade Missile Command

      Most games on this canvas ask for both hands. URN Arcade Missile Command asks for one: point at the falling dot, click, watch your interceptor arc up and bloom into a circle of white, repeat until you forget you were refreshing the queue. Six cities are burning down behind you and there is exactly one right answer for each wave - the ammo you didn't waste.

      What it is

      A standalone mini-game node from Clivey1234/Comfy-URN-Arcade-Games, the pack that puts five arcade classics inside ComfyUI as things you can actually play while a job renders. Missile Command is the crosshair one. Like its four siblings it needs no wiring - no inputs, no outputs, nothing to connect to the rest of the graph.

      How it's built, and why your render doesn't care

      The Python side of this node is a shell. It declares no visible inputs, returns an empty tuple and is not an output node, so ComfyUI's executor never runs it - mathematically incapable of touching your render. All the gameplay lives in web/urn_arcade_missile_command.js, which the pack loads as a frontend extension via WEB_DIRECTORY.

      On node creation it mounts a DOM widget containing the game's canvas and resizes the node to at least 460×520 so there's actual room. The widget doesn't serialise, which means the game isn't embedded in workflow JSON files you save or share. The JS also subscribes to ComfyUI's execution_start/execution_success/execution_error/execution_interrupted events: when you hit Queue Prompt, an idle game starts itself and the status dot in the footer turns green.

      The controls, and the rule that makes it a game

      • Mouse to aim, left click to fire. Arrow keys move the crosshair too, and Space fires.
      • P pauses, R restarts, NEW and PAUSE buttons do the same behind the canvas.
      • Click the play area once before using keys - the keyboard listener is bound to the canvas element, not the page.

      What you have to manage: three missile batteries, ten interceptors each, thirty per wave, and six cities that do not get rebuilt. Splash damage is generous - an interceptor detonates where you aimed and the expanding circle kills anything inside it, so one well-placed shot can take out a cluster. From wave three onward some warheads MIRV mid-descent and split into two, which is where single-click discipline stops being optional.

      Scoring rewards survival over spraying: 25 per warhead destroyed, then at the end of a wave you're paid 100 × surviving cities + 5 × unfired missiles. Lose every city and it's over. Waves get longer (8 + 3 × level warheads) and faster, and the stock of missiles is replenished each wave - not the cities. That last bit is the whole tragedy of the game and it still works fifty years later.

      Install

      Manager → search URN Arcade, install, restart ComfyUI. Or:

      cd ComfyUI/custom_nodes
      git clone https://github.com/Clivey1234/Comfy-URN-Arcade-Games.git
      

      Restart is not optional; frontend JS registers at startup. The pack has no requirements.txt, no pyproject.toml and no install.py, and the README's "No Requirements needed" is literally true. Nothing installs, nothing downloads, no pip resolver drama in your shared ComfyUI environment. Model files: none.

      Sound

      Sounds/MissileCommand/ ships launch.wav, explosion.wav, enemy_explosion.wav, city_destroyed.wav and level_complete.wav, served from a route the pack registers on ComfyUI's own server with no-store cache headers. Replace a WAV keeping the filename, refresh, done - and the pack deliberately omits the Sounds folder from updates so a git pull won't overwrite your files. Missing WAV or no click yet (browser autoplay rules)? It falls back to synthesised WebAudio tones and noise rather than going silent. SND button and slider remember your setting per game.

      Where it bites

      • Blank node on old frontends. Without addDOMWidget the script retries for two seconds, then logs and gives up. Update ComfyUI.
      • Mouse aiming feels off if the node is tiny. The widget asks for a minimum size and the game resizes with the node; drag the node bigger and the target area scales with it.
      • Nodes 2.0. ComfyUI's Vue-based node rewrite broke plenty of canvas-patching packs, and a DOM-widget game is squarely that category. If the widget renders wrong or the node spazzes on zoom, test with the legacy canvas.
      • Chrome and Edge only per the README. Firefox/Safari are untested.
      • Clicking inside the widget deliberately stops propagation so ComfyUI doesn't treat it as a canvas click - but if you're fighting another extension that eats pointer events on nodes, that's the usual suspect.
      • Scores are localStorage (comfyMissileCommandHighScore), per browser. Refreshing the page ends the run.
      CategoryURN Arcade Games

      Inputs (0)

      No inputs

      Outputs (0)

      No outputs