Coder shrinks classic Snake game down to a 56-byte QR code

Coder shrinks classic Snake game down to a 56-byte QR code

What’s the Buzz?

The classic Snake game that once ruled Nokia screens has now been reimagined in a mind-blowing way. Developer donno2048 has successfully condensed the game into a minuscule 56 bytes, small enough to fit into a single QR code.

This MS-DOS version of Snake is now considered one of the smallest functional games ever created. To put it into perspective, a basic “Hello World” program typically ranges in size from a few kilobytes to around 10 kilobytes. Even the original Pac-Man from 1980 was significantly larger, weighing in at approximately 12 kilobytes.

Despite its tiny size, squeezing Snake into 56 bytes did come with some sacrifices. There’s a quirky glitch where inputting reverse directions once the snake reaches a length of three segments causes it to eat itself – a challenge that seasoned Snake players might actually enjoy.

While the game works well on emulators like DOSBox and web-based platforms, it runs too fast on original hardware. Adjustments are needed to slow down the execution and make it playable on vintage systems, although these adjustments may slightly increase the size beyond 56 bytes. Nevertheless, this implementation is likely the smallest of its kind.

The trend of QR code games first gained traction with MattKC’s experiment in 2020, which inspired the development of this new 56-byte version. Various developers have continuously worked on shrinking the code size, with donno2048 managing to reduce it to 85 bytes in 2023 before achieving the remarkable feat of 56 bytes in their latest iteration.

Witnessing the evolution of the QR code size over the years is truly fascinating!

If you’re eager to experience this tiny Snake game, an online demo is available. Control the hungry serpent using arrow keys on your PC or swipes on your mobile device.

Leave a Reply

Your email address will not be published. Required fields are marked *