Open bryanpg.combryanpg.com/pragma_twice
Pragma Twice
A dystopian sci-fi themed programming puzzle game where players write real JavaScript code to improve their character's kernel. Features sandboxed execution with Web Workers and SharedArrayBuffer, available on web and desktop via Electron.
Visit project- First shared
- Sep 10, 2026
- HN activity
- 20
Show HN@umviSep 10, 2026
Show HN: Pragma Twice – A dystopian sci-fi themed programming game
Hey HN, I'm Bryan. I released Pragma Twice earlier this week in anticipation for Steam's "Programming Fest". Pragma Twice is a programming puzzle game in the same vein as Untrusted (https://untrustedgame.com/). You have to write real JavaScript code to incrementally improve your playable character's "kernel" over the course of the game. Beating levels autonomously (without keyboard inputs) reveals a competitive time/code golf aspect to the game. I started developing Pragma Twice over 4 years ago after playing Untrusted and loving it. It took so long to develop because I'm not a full time game developer... between my actual job, my kids, and my own self-motivation, it's taken a lot longer than I originally hoped to get this game shipped! It's definitely what you might call a passion project. Anyway, I plan to keep iterating on it, so give it a spin and let me know what you think! A few technical details/challenges: - The game was originally written in vanilla JavaScript, but I later converted it to TypeScript (which had an astonishing ROI) - Uses PixiJS for the graphics and a custom game engine built around Web Workers + SharedArrayBuffer for sandboxing and guarding against things like infinite loops - The web version is hosted on GitHub Pages, which was challenging because of the SharedArrayBuffer requirement (I use https://github.com/gzuidhof/coi-serviceworker to work around this) - The linux/windows versions use Electron - Uses CodeMirror for in-game editor/console - Levels built with LDtk - Automated game testing with Puppeteer Steam: https://store.steampowered.com/app/3528840/Pragma_Twice/ Dev Notes: https://www.bryanpg.com/games/pragma_twice
Community