URN Arcade PacMan
URN Arcade PacMan is a real maze chase, not a gag node
Here's the honest review before anything else: of the five games in this pack, PacMan is the one that was built hardest. Its frontend file is 52 KB - four times the size of anything else in web/ - with a hand-authored fixed maze, ghost targeting personalities, a ghost house with door rules, energizers, a side tunnel and the doubling ghost-eat score. This is not a novelty sprite that runs left and right. If you're going to lose twenty minutes inside ComfyUI, this is where they're going.
What it is and where it fits
Part of Clivey1234/Comfy-URN-Arcade-Games, a pack of five playable arcade classics that live on the canvas. PacMan is standalone like the rest: nothing to wire, nothing to connect, no effect on what you're rendering. You add it, you play it while the queue churns, you delete it or leave it sitting in the corner of a big workflow.
That's the actual use case, and it's a better one than it sounds. Alt-tabbing into a real game during a video render means competing for the exact VRAM your job needs - a frequent grumble on r/StableDiffusion, usually answered with --reserve-vram and a shrug. A 2D canvas widget in the browser tab you already have open doesn't do that.
Under the hood
The Python class for this node is a placeholder that does nothing: no visible inputs, an empty return tuple, not an output node. ComfyUI's executor prunes it, so it can't slow, stall or break a render. The gameplay is entirely web/urn_arcade_pacman.js, loaded as a frontend extension through the pack's WEB_DIRECTORY.
When the node is created, the JS mounts a DOM widget with the game canvas and grows the node to fit (minimum 460×520). The widget doesn't serialise, so it won't be written into workflow JSON. It also hooks ComfyUI's execution events - execution_start, execution_success, execution_error, execution_interrupted - which is why the footer literally reads "QUEUE A WORKFLOW TO AUTO-START." Hit Queue Prompt with an idle game and it deals you a fresh maze; the status dot goes green while the job runs.
Controls that matter
Arrow keys steer, and each direction includes a small input buffer so turns register a fraction early instead of dropping - the single most important quality-of-life feature a Pac-Man clone can have.
P pauses, R restarts. Click the play area first: the key listener is bound to the canvas and the code calls both preventDefault() and stopPropagation(), so while you're playing, arrows steer Pac-Man instead of scrolling your graph.
What's actually implemented
- A fixed maze, not the procedural one earlier builds used. Walls, energizers and the horizontal side tunnel are hand-placed, and the code comments call it "classic arcade-style."
- Four ghosts with personalities. Blinky targets you directly, Pinky aims four tiles ahead of your facing direction, Inky overshoots relative to Blinky, and there's a fourth house-bound one. They leave the pen in order, respect the door rules, and once out they don't wander back in.
- Energizers and the eat chain. Eating a power pellet flips the ghosts to frightened for 7 seconds and starts the eat values at 200, doubling to 400, 800, 1600 for each ghost in the same chain.
Scoring, lives and level live in the HUD at the top of the widget, and the high score is stored per browser in localStorage under comfyPacmanHighScore.
Sound is a legit feature here
PacMan has the richest audio in the pack - start.wav, pellet_1.wav, pellet_2.wav, power_pellet.wav, frightened.wav, ghost_eaten.wav, death.wav, level_complete.wav, all preloaded from Sounds/Pacman/. frightened.wav is a looping sample, and the code has an explicit guard so re-requesting it doesn't stack a second copy on top - the same loop just keeps playing. That's the file to replace first if you want to swap the waka for something less likely to wake the house.
Audio is served from a route the pack registers on the ComfyUI server with no-cache headers, so dropping your own WAV in with the same filename takes effect on refresh. Updates skip the Sounds folder on purpose so your files survive. If a file's missing, or the browser hasn't had a user gesture yet, the game synthesises its own blips instead of going quiet. SND and the volume slider persist per game.
Install
Manager → search URN Arcade. Or manual:
cd ComfyUI/custom_nodes
git clone https://github.com/Clivey1234/Comfy-URN-Arcade-Games.git
Restart ComfyUI - frontend extensions load at startup only. There's no requirements.txt, no install.py, no models. Nothing is pip-installed, which is a small mercy given how easily custom-node dependency chains contaminate a shared Python environment.
If something's off
- Blank node: needs a current ComfyUI frontend with
addDOMWidget. On an old one it retries for two seconds then logs a failure. Update. - Weird rendering: ComfyUI's Nodes 2.0 frontend rewrite broke a lot of canvas-patching packs, and DOM-widget games are that category. Try the legacy canvas.
- Arrows scrolling the graph or triggering queue shortcuts: the canvas doesn't have focus. Click the maze.
- Ghosts feel dumb or the maze looks off after a ComfyUI update: the pack is a single-author project and its last visible commit is a README edit; if gameplay logic looks stale, check the repo for a newer version rather than assuming you misconfigured something.
- Chrome and Edge only, per the README. Firefox and Safari aren't tested.
Inputs (0)
No inputs
Outputs (0)
No outputs