Nodes/Comfy-URN-Arcade-Games/URN Arcade Frogger
ComfyUI Node

URN Arcade Frogger

Something to do with the four minutes your render is chewing on

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

      You queued a video job. The progress bar is at 8% and the ETA is a lie. Alt-tabbing into an actual game is the obvious move, except that on a heavy WAN or Hunyuan render your GPU is already pinned and the machine is barely usable - it's a well-worn complaint on r/StableDiffusion, usually answered with "go fiddle with --reserve-vram and hope." URN Arcade Frogger takes the other road: a five-lane, hop-and-die time sink drawn onto the ComfyUI canvas itself, in 2D, for roughly zero VRAM.

      What this node actually is

      It ships in Clivey1234/Comfy-URN-Arcade-Games, a small pack that adds five playable arcade classics as nodes: Frogger, PacMan, Space Invaders, Missile Command and Lunar Lander. Frogger is the traffic one - road lanes, a river of logs and turtles, and five home slots you have to fill.

      The important part for a beginner: it's standalone. Drop it on the canvas, don't wire anything, and it works. There are no connectors to chase because there is nothing to connect.

      How it works (and why it can't break your workflow)

      Open the pack's __init__.py and the Python side is almost sarcastic in its minimalism. All five games inherit one base class that declares no visible inputs, returns an empty tuple, and isn't an output node. So the executor never touches it - it isn't part of the graph that produces your image, it can't block a render, and bypassing or muting it changes nothing.

      The game is entirely frontend. The pack sets WEB_DIRECTORY = "./web" and web/urn_arcade_frogger.js registers itself as a ComfyUI frontend extension. On node creation it builds a DOM widget, bolts the game's HTML/canvas onto your node, and grows the node to at least 480×560 so there's room to play. That widget is marked serialize: false, which is a nice touch - your arcade cabinet doesn't end up baked into every workflow JSON you share.

      Two behaviours worth knowing before you think it's broken:

      • Queuing a prompt auto-starts the game. The JS listens for execution_start / execution_success / execution_error / execution_interrupted, so when the queue kicks off, an idle cabinet deals you a fresh frog. A status dot in the footer goes green while a job is running.
      • Keys only work when the game has focus. Click the play area once. Arrow keys are then intercepted with preventDefault(), so you're not also panning the ComfyUI graph while hopping.

      Controls and what's going on in there

      Arrow keys hop the frog; there's no fire button in this one. Up is progress, and every forward hop is +10 points. P pauses, R starts over.

      The playfield is thirteen rows: five traffic lanes of cars, trucks and one race car, each with its own speed and direction, then a river where you ride logs and turtles. Reach one of the five home slots at the top and you bank 500 points plus ten per second left on the clock. Fill all five and there's a 1,000-point bonus, a level bump, and a shorter timer. You get three frogs. Miss a slot by a hair, get flattened, drift off-screen or let the 60-second clock expire and you lose one. The lane speeds in the current build were bumped 1.2× after a wraparound fix, so it's a little meaner than the arcade original.

      Installing it

      ComfyUI Manager → search URN Arcade → install. Or by hand:

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

      Then restart ComfyUI - frontend JS is only discovered at startup, so a page refresh on the old process won't cut it. That's the whole install. There is no requirements.txt, no pyproject.toml, no install.py in the repo, so nothing gets pip-installed and no model files are downloaded. The README's "No Requirements needed" is accurate for once.

      Sounds, and the bit that'll surprise you

      The repo ships a Sounds/Frogger/ folder of WAVs - hop.wav, home.wav, death.wav, level_complete.wav, timer_warning.wav. They're served over a small HTTP route the pack registers on the ComfyUI server (/urn_arcade/sounds/Frogger/<file>.wav) with cache headers explicitly set to no-store. Translation: drop in your own WAV with the same filename, refresh, and you hear it immediately. The pack's own comment says updates intentionally omit the Sounds folder so git pull won't clobber your replacement audio.

      If a WAV is missing or the browser hasn't had a user gesture yet - autoplay policy, nothing you did wrong - the code falls back to synthesised WebAudio blips rather than silence. The SND button and volume slider remember your choice per game.

      Where people get burned

      • Old frontend = empty node. If addDOMWidget isn't available, the JS retries for two seconds and then gives up with a console error. If your node is a blank box, update ComfyUI; this needs a reasonably current frontend.
      • The Nodes 2.0 frontend. ComfyUI's Vue-based node rewrite broke a lot of packs that patch the canvas, and DOM-widget games are squarely in that blast radius. If the widget renders weirdly, try the legacy canvas before filing anything.
      • Chrome and Edge only. The README says so outright. Firefox and Safari are untested.
      • High score is per browser. It lives in localStorage (comfyFroggerHighScore), so it doesn't follow you between machines and dies with your site data. Refreshing mid-game ends the run.
      • It still runs while you scroll. Motion is paused when the node is off-screen or the tab is hidden, so it's cheap on a laptop. But there are also comfy_frogger.js legacy files in web/ that load and watch for an older node name (ComfyFroggerSPB1234T) - they no-op here. Console noise, not a problem.
      CategoryURN Arcade Games

      Inputs (0)

      No inputs

      Outputs (0)

      No outputs