ClaudeMods
☰
EN
● 0 online · Views 0 times
SponsorsSubmit a project
Reddit posts · by cleverhoods

Time well spent - Yes, Claude mods can run Doom

... and it was annoying as hell to port it. how it works, short version: the mod sandbox has no WebAssembly, so the engine is a native binary the mod starts with $.process.spawn and talks to over a unix socket (127.0.0.1 + a token on windows). prebuilt for linux/macos/windows × x86_64/arm64 with zig cc, so no compiler needed in kitty the picture is an Image pointed at a file the engine writes. claude code just hands kitty the path, zero pixels go through it. everywhere else it's a Raster of quadrant blocks (4 px a cell) claude code only draws ~3 frames/s when nothing else moves, so a strip under the game redraws itself every 30 ms to keep frames coming. ~31 fps in kitty, ~35-40 with blocks keyboard managing is a nightmare, TS only has an "onPress" event. a terminal never tells you a key was released, it just repeats the newest key after its repeat delay. claude code turns on kitty keyboard flags 5 only, so mods can't see releases either. my first guess (hold a turn key 220 ms) made a held turn stop dead for ~300 ms before the repeats kicked in. what fixed it was reading how other terminal dooms fake it: - doom-cli: learn the repeat delay, hold a key until its next repeat is due - i

Translated

About this mod

... and it was annoying as hell to port it. how it works, short version: the mod sandbox has no WebAssembly, so the engine is a native binary the mod starts with $.process.spawn and talks to over a unix socket (127.0.0.1 + a token on windows). prebuilt for linux/macos/windows × x86_64/arm64 with zig cc, so no compiler needed in kitty the picture is an Image pointed at a file the engine writes. claude code just hands kitty the path, zero pixels go through it. everywhere else it's a Raster of quadrant blocks (4 px a cell) claude code only draws ~3 frames/s when nothing else moves, so a strip under the game redraws itself every 30 ms to keep frames coming. ~31 fps in kitty, ~35-40 with blocks keyboard managing is a nightmare, TS only has an "onPress" event. a terminal never tells you a key was released, it just repeats the newest key after its repeat delay. claude code turns on kitty keyboard flags 5 only, so mods can't see releases either. my first guess (hold a turn key 220 ms) made a held turn stop dead for ~300 ms before the repeats kicked in. what fixed it was reading how other terminal dooms fake it: - doom-cli: learn the repeat delay, hold a key until its next repeat is due - intermission: 550 ms after a press, 120 ms while repeating, mouse-only turning - claude-doom: 160 ms pulse per press - doom-braille: release after 100 ms of silence went with doom-cli's model, plus the fix its own source suggests in a TODO: turn slowly until the repeats start. a tap now turns ~10° instead of ~60°, and a held key never stops. the mouse is the only input that reports its release, so dragging sideways on the game turns at exactly the a/d speed and stops the moment you let go. walk with w/s and turn with the mouse at the same time. one more thing: played on linux only. macos and windows engines are built but they are yet to run, so if you're on a mac/windows, I'd love to know if it works. /plugin marketplace add reporails/arcade /plugin install doom@reporails-arcade then CLAUDE_CODE_NO_FLICKER=1 claude and /doom. repo: github.com/reporails/arcade (MIT; the engine is GPL-2.0, the game data is Freedoom, BSD). submitted by /u/cleverhoods [link] [comments]

Installation

See the original source for installation instructions.

Original text / README

... and it was annoying as hell to port it. how it works, short version: the mod sandbox has no WebAssembly, so the engine is a native binary the mod starts with $.process.spawn and talks to over a unix socket (127.0.0.1 + a token on windows). prebuilt for linux/macos/windows × x86_64/arm64 with zig cc, so no compiler needed in kitty the picture is an Image pointed at a file the engine writes. claude code just hands kitty the path, zero pixels go through it. everywhere else it's a Raster of quadrant blocks (4 px a cell) claude code only draws ~3 frames/s when nothing else moves, so a strip under the game redraws itself every 30 ms to keep frames coming. ~31 fps in kitty, ~35-40 with blocks keyboard managing is a nightmare, TS only has an "onPress" event. a terminal never tells you a key was released, it just repeats the newest key after its repeat delay. claude code turns on kitty keyboard flags 5 only, so mods can't see releases either. my first guess (hold a turn key 220 ms) made a held turn stop dead for ~300 ms before the repeats kicked in. what fixed it was reading how other terminal dooms fake it: - doom-cli: learn the repeat delay, hold a key until its next repeat is due - intermission: 550 ms after a press, 120 ms while repeating, mouse-only turning - claude-doom: 160 ms pulse per press - doom-braille: release after 100 ms of silence went with doom-cli's model, plus the fix its own source suggests in a TODO: turn slowly until the repeats start. a tap now turns ~10° instead of ~60°, and a held key never stops. the mouse is the only input that reports its release, so dragging sideways on the game turns at exactly the a/d speed and stops the moment you let go. walk with w/s and turn with the mouse at the same time. one more thing: played on linux only. macos and windows engines are built but they are yet to run, so if you're on a mac/windows, I'd love to know if it works. /plugin marketplace add reporails/arcade /plugin install doom@reporails-arcade then CLAUDE_CODE_NO_FLICKER=1 claude and /doom. repo: github.com/reporails/arcade (MIT; the engine is GPL-2.0, the game data is Freedoom, BSD). submitted by /u/cleverhoods [link] [comments]

Similar projects