Show HN: I made a Doom-like game fit inside a QR code
QR Code Scanning & Platform Compatibility
- Many reports that iOS’s native camera says “No usable data found”; explanation that iOS camera won’t treat
data:URIs as clickable targets even when the payload is tiny. - Workarounds suggested:
- Use a web-based QR decoder (e.g., upload the PNG and copy the decoded URI).
- Use third‑party QR apps or desktop software that accept image input.
- Initially the game didn’t support mobile controls and was effectively desktop‑only; later, after size optimizations, limited touch support was added for Chromium-based mobile browsers.
- Several users saw a black screen on Firefox/iOS/Android; fixes were pushed and later reports say it works, though some browser quirks (focus, key mapping) remain.
Data URLs, Compression, and Size Golf
- The QR encodes a
data:text/html(originally base64) payload; discussion on:- Using raw text
data:URIs vs base64 to shave bytes. - Browser restrictions on top‑level
data:navigation (bookmarks vs links). - Using
DecompressionStreamand tight HTML/JS trimming to free more space.
- Using raw text
- A PR reduced payload size enough to add touch controls, better movement, and enemies.
- Side discussions reference similar micro‑demos, procedural games, and WASM-in-QR projects.
Security & Malware Concerns
- Multiple commenters worry about “running code from a QR code.”
- Others argue this is equivalent to opening any arbitrary URL with JavaScript; the real risk is malicious sites, not the QR format itself.
- Historical exploits via image/audio parsers are mentioned as examples of what’s possible if decoders are buggy.
- Some propose standard or UX improvements (e.g., enforcing human‑readable URL text matching the QR).
Design Choices, UX, and Aesthetics
- Debate over using
image-rendering: pixelated: some prefer crisp pixels; the author prefers the blurrier, “retro” look. - Criticism that a QR-based game not primarily targeting phones is a “design issue”; the author cites tight size budget for mobile UI but invites others to build variants with the compression tooling.
- Multiple requests for screenshots/GIFs instead of only a trailer; a GIF and gameplay media were later added, plus a hosted version to bypass scanning.
Technical & Conceptual Spin‑offs
- Explanations of QR capacity and 8‑bit mode enabling arbitrary binary data; examples include encoding RSA keys and prior “game-in-a-QR” work.
- Ideas floated: QR-embedded 3D print files, low-resource comms via QR over SSTV, self-contained P2P chat (blocked by browser limits), and even “LLM in a QR”–style experiments.