Learn how a QR code ordering system lets Wing Nin Noodles in Hong Kong receive and manage over 273,602 scans and orders more efficiently. -
From a neighborhood favorite to 270K plus orders, Wing Nin Noodle shows how a QR code ordering system helps busy restaurants serve faster, cut wait times, and keep the dining experience smooth.
A strong example of how tradition and smart tech work well together.
Hi! I'm Kuber! I go by kuberwastaken on most platforms and I'm a dual degree undergrad student currently in New Delhi studying AI-Data Science and CS.
Posting this on reddit way later than I should've because I never really cared to make an account but hey, better late than never.
Well it’s still kind of clickbait because I made what I call The BackDooms, inspired by both DOOM and the Backrooms (they’re so damn similar) but it’s still really fun and the entire process of making it was just as cool! It also went extremely viral on Hacker News and LinkedIn and is one of those projects that are closest to my heart.
If you just want to play the game and not want to see me yapping, please skip to the bottom or just scan the QR code (using something that supports bigger QR codes like scanqr) and just paste it in your browser. But if you’re at all into microcode or gamedev, this would be a fun read :)
The Beginning
It all started when I was just bored a while back and had a "mostly" free week so I decided to pick up games in QR codes for a fun project or atleast a rabbit hole. I remember watching this video by matttkc maybe around covid of making a snake game fit in a QR code and he went the route of making it in a native executable, I just thought what I could do if I went down the JavaScript route.
Now let me guide you through the premise we're dealing with here:
QR codes can store up to 3KB of text and binary data.
For context, this post, until now in plaintext is over 0.6KB
My goal: Create a playable DOOM-inspired game smaller than a couple paragraphs of plain text.💀
Now to make a functional game to make under these constraints, we’re stuck using:
• No Game Engine – HTML/JavaScript with Canvas
• No Assets – All graphics generated through code
• No Libraries – Because Every byte counts!
To make any of this possible, we had to use Minified Code.
But what the heck is Minified Code?
To get games to fit in these absurdly small file sizes, you need to use what is called minification
or in this case - EXTREMELY aggressive minification.
I'll give you a simple example:
function drawWall(distance) {
const height = 240 / distance;
context.fillRect(x, 120 - height/2, 1, height);
}
post minification:
h.fillRect(i,120-240/d/2,1,240/d)
Variables become single letters. Comments evaporate and our new code now resembles a ransom note lol
The Map Generation
In earlier versions of development, I kept the map very small (16x16) and (8x8) while this could be acceptable for such a small game, I wanted to stretch limits and double down on the backrooms concept so I managed to figure out infinite generation of maps with seed generation too
if you've played Minecraft before, you know what seeds are - extremely random values made up of character(s) that are used as the basis for generating game worlds.
Making a Fake 3D Using Original DOOM's Techniques
So theoretically speaking, if you really liked one generation and figure out the seed for it, you can hardcode it to the code to get the same one each time
My version of a simulated 3D effect uses raycasting – a 1992 rendering trick. and here's My simplified version:
For each vertical screen column (all 320 of them):
Cast a ray at a slightly different angle
Measure distance to nearest wall
Draw a taller rectangle if the wall is closer
Even though this is basic trigonometry, This calls for a significant chunk of the entire game and honestly, if it weren't for infinite map generation, I would've just BASE64 coded the URL and it would have been small enough to run directly haha - but honestly so worth it
Enemy Mechanics
This was another huge concern, in earlier versions of the game there were just some enemies in the start and then absolutely none when you started to travel, this might have worked in the small map but not at all in infinite generation
The enemies were hard to make because firstly, it's very hard to make any realistic effects when shooting or even realistic enemies when you're so limited by file size
secondly, I'm not experienced, I’m just messing around and learning stuff
I initially made it so the enemies stood still and did nothing, later versions I added movement so they actually followed you
much later did I finally get a right way to spawn enemies nearby while you are walking (check out the blog for the code snippets, reddit doesn't have code blocks in 2025)
Making the game was only half the challenge, because the real challenge was putting it in a QR code
How The Heck do I Put This in a QR code
The largest standard QR code (Version 40) holds 2,953 bytes (~2.9 KB).
This is very small—e.g:
a Windows sound file of 1/15th of a second is 11 KB.
A floppy disk (1.44 MB) can store nearly 500 QR Codes worth of data.
My game's initial size came out to 3.4KB
AH SHI-
After an exhaustive four-day optimization process, I successfully reduced the file size to 2.4 KB, albeit with a few carefully considered compromises.
Remember how I said QR codes can store text and binary data
Well... executable HTML isn't binary OR plaintext, so a direct approach of inserting HTML into a QR code generator proved futile
Most people usually advice to use Base64 conversion here, but this approach has a MASSIVE 33% overhead!
leaving less than 1.9kb for the game
YIKES
I guess it made sense why matttkc chose to make Snake now
I must admit, I considered giving up at this point. I talked to 3 different AI chatbots for two days, whenever I could - ChatGPT, DeepSeek and Claude, a 100 different prompts to each one to try to do something about this situation (and being told every single time hosting it on a website is easier!?)
Then, ChatGPT casually threw in DecompressionStream
What the Heck is DecompressionStream
DecompressionStream, a little-known WebAPI component, it's basically built into every single modern web browser.
Think of it like WinRAR for your browsers, but it takes streams of data instead of Zip files.
That was the one moment I felt like Sheldon cooper.
the only (and I genuinely believe it because I practically have a PhD of micro games from these searches) way to achieve this was compressing the game through zlib then using the QR code library on python to barely fit it inside a size 40 code...?
Well, I lied
Because It really wasn’t the only way - if you make your own compression algorithm in two days that later gets cited by a NASA Scientist and cites you
You see, fundamentally, Zlib and GZip use very similar techniques but Zlib is more supported with a lot of features like our hero decompressionstream
Unless… you compress with GZip, modify it to look like a Zlib base64 conversion and then use it and no, this wasn’t well documented anywhere I looked
I absolutely hate that reddit doesn’t have mermaid graph support but I’ll try my best to outline the steps anyways haha
Read Input HTML -> Compress with Zlib -> Base64 Encode -> Embed in HTML Wrapper
-> DecompressionStream 'gzip' -> Format Mismatch
-> Convert to Data URI -> Fits QR Code?
-> Yes -> Generate QR
-> No -> Reduce HTML Size -> Read Input HTML
Make that a python file to execute all of this-
IT WORKS
It was a significant milestone, and I couldn't help but feel a sense of humor about this entire journey. Perfecting a script for this took over 42 iterations, blood, sweat, tears and processing power.
This also did well on LinkedIn and got me some attention there but I wanted the real techy folks on Reddit to know about it too :P
Hosted Version (with significant improvements) : https://kuber.studio/backdooms/ (conveniently, my portfolio comes up if you remove the /backdooms which is pretty cool too :P)
Game Trailer: https://www.youtube.com/shorts/QWPr10cAuGc
Said Research Paper Citation by Dr. David Noever (ex NASA) https://www.researchgate.net/publication/392716839_Encoding_Software_For_Perpetuity_A_Compact_Representation_Of_Apollo_11_Guidance_Code
The Tamagotchi Pix brings a new connection technology to the table, it doesn’t use the traditional infrared technology, nor the briefly used NFC technology found in the Tamagotchi 4U, and Tamagotchi Friends line. The Tamagotchi Pix utilizes the built-in camera to scan “Tama Codes”. These Tama Codes are merely QR codes that are generated on one Tamagotchi Pix, and are then scanned by another Tamagotchi Pix using the built-in camera. This Tama Codes QR technology will unlock a whole new world of connecting, and even introduce some highly anticipated features.
Let’s start with the basics, what are QR codes? QR codes are matrix barcodes that contain information and can be scanned using a camera. Connecting two Tamagotchi’s together is nothing new, but the technology behind it in the Tamagotchi Pix is.
To use the new Tama Codes technology to connect, you’ll still access the same connection icon in the menu. Once you’re in the connection menu you will then choose how you would like to connect with another Tamagotchi Pix. Options will include games, gifts, going out, and meeting up!
In the Toys “R” Us Tamagotchi Pix walkthrough video theres a demonstration on how you will be able to give gifts between two Tamagotchi Pix devices. Once you choose the giving gifts option, you will then choose if you would like to send or receive a gift.
If you chose to give a gift, you will then browse the items you have saved on your device, and select the one you wish to give. You will then see an intimation which consists of the transformation animation and rainbow clouds with then resolve into a QR code, better wise known as a Tama Code.
The other Tamagotchi Pix who wishes to receive the item will access the connection menu, choose gift, and then choose the receive option. The built-in camera will let you scan the screen of the other Tamagotchi Pix, and the item will then be transferred. The item is then delivered right to your Tamagotchi in their living space.
So why are we so excited about Tama Codes? Well there are some benefits that we are really excited bout. First off, since the Tamagotchi Pix uses the built-in camera for connecting, we no longer need to keep the top of the device open to make room for the infrared technology to connect with others. Yes, we know the Tamagotchi Meets/On/Some really did a great job connecting through those thick silicon and yarn cases.
We’re also excited because of the ability to connect remotely, this is something we covered in an article here. You should be able to connect with others around the global thanks to the generation of Tama Codes, and use of our smartphones cameras. Lastly, we are excited because previous technologies such as infrared and NFC did not allow us to schedule connections since they require the devices be near one another when connecting. It also appears that connecting two Tamagotchi Pix devices together with Tama Codes is much faster than waiting for infrared to connect.
The Tamagotchi Pix will be the first Tamagotchi ever to allow users to schedule playdates! There is no footage of this shown the in video but you should be able to schedule a playdate between two Tamagotchi Pix devices and scan Tama Codes to lock it in!
How awesome will it be to connect with others around the globe, connect with others faster than before, and even schedule playdates? We must say that Tama Codes definitely have a nice advantage over infrared and NFC and this might just be the next generation of connection for Tamagotchi moving forward!