HubLensJavaScriptKuberwastaken/backdooms
Kuberwastaken

backdooms

Frontend#HTML#JavaScript#Compression#Web Development
View on GitHub
628

// summary

The Backdooms is a highly compressed, self-extracting web game inspired by DOOM that functions entirely within a QR code. It utilizes Zlib compression and the DecompressionStream API to execute the game directly in a browser without requiring an internet connection. This project serves as a technical exploration of pushing QR code storage limits for lightweight web applications.

// technical analysis

The Backdooms is an experimental project that explores the limits of data density by embedding a fully functional, self-extracting game directly into a QR code. By leveraging Zlib compression, Base64 encoding, and the browser's native DecompressionStream API, the project achieves a lightweight architecture that eliminates the need for external hosting or internet connectivity. This approach demonstrates a creative trade-off between extreme code minimization and browser-based execution, effectively turning a static image into a portable, executable application.

// key highlights

01
Achieves extreme data density by utilizing Zlib compression combined with Gzip decompression streams to fit complex game logic into a tiny footprint.
02
Operates entirely offline, as the complete game code is embedded within the QR code's data payload.
03
Employs a self-extracting HTML wrapper that dynamically decompresses and executes the game within modern web browsers.
04
Supports mobile compatibility by leveraging standard browser APIs like DecompressionStream, ensuring the game runs on various mobile platforms.
05
Provides a flexible Python-based generation tool that allows users to convert their own HTML files into optimized QR codes.

// use cases

01
Hosting lightweight web applications entirely within a QR code
02
Extreme data compression using Zlib and Gzip streams
03
Offline browser-based gaming via self-extracting HTML wrappers

// getting started

To begin, ensure you have Python 3.7+ installed and run 'pip install qrcode[pil]' to set up the necessary dependencies. You can then use the provided 'QRGEN.py' script to convert your own HTML game files into a QR code image. Once generated, simply scan the resulting image with a smartphone or QR scanner to launch and play the game directly in your browser.