40KB was the standard game size for NES cartridges back in the late 80s and early 90s. This 40KB Project was created as a personal challenge to test myself. I was able to fit 25 games into this 40KB file. These games are ideal for dial-up and will work on almost any browser or operating system. Below is how it was accomplished.
Without any form of compression, this project would be approximately 10MB. By swapping out graphics with emojis and drawing graphic shapes instead of using 256KB graphics, I saved an estimated 8,960KB. This reduced the project size to 140KB, with a size on disk of 116KB.
After manually compressing the text by hand and using ChatGPT on larger games, I managed to reduce it to 69.5KB, with a size on disk of 104KB. This was achieved by removing all notation, shortening variable names, and eliminating unnecessary line breaks and indents. While this makes the code difficult to navigate, I will provide both the compressed and uncompressed versions.
Finally, compressing it as a standard ZIP file resulted in a file size of 39.6KB, with a size on disk of 40KB. I could have reduced the size further using WinRAR, saving an additional 3KB, but I chose not to require extra software.
(c)MThorns 2025