This Game Only Weighs 8 KB! by UnidayStudio
The theme was "Limited Space", so I took it quite literally.
Created by Guilherme Teres (@UnidayStudio)

But... WHY?
This code was put together in a few (around 3) hours to fit the theme. I had this idea to make a game with the final executable having the smallest size as possible, ideally bellow 16 KB, since I was not able to think about anything else with this theme.
Unfortunately I lost the first two days of the jam trying other (more complex) ideas, so I was not able to put this in the Compo, even making it in 3 hours. I think it would be a perfect game for the category. But I'll leave it open source anyways!
The game itself is very simple, just a Sokoban clone with no sound and a few levels. But it have some interesting features, such as procedurally generated textures for the sprites and a hand drawn character pixel art using nothing but binary. :P
Code is a bit of a mess, but given the short amount of time I had, I'm happy with it. It uses no external lib, just Windows.h, which sadly makes it window specific, but I think it would be a bit harder to make it extremely small in size and still cross platform.

Update (Before Jam Ends):
One hour remaining for the end of the Jam, I managed to remove LIBC from the project, saving another ~8 KB. I'll keep BOTH versions for download here, so you can try them all. The only difference is the size in disk and I made both versions DURING the jam (so keep that in mind). This is how it looks like now:

This was my first attempt to make an executable small, I know that there are plenty of advanced techniques out there that I'm not using and that I could same a lot more space on stack and not using any default lib, but I'l already happy with the result.
It was fun to develop this little project! :)
Bonus: Building the Source Code
If you want to check how I manage to make it so small or even try to add new levels yourself, you can follow those steps:
In order to build this project, you must be on Windows and have MSVC and Make installed. Then you need to follow those steps:
- Open the Native Tools Command Prompt for VS (so you can use msvc's
clandlink) - Navigate to this project's root folder
- Type
make
Enjoy it!
| Source Code | https://github.com/UnidayStudio/This-Game-is-Only-16-KB- |
| Original URL | https://ldjam.com/events/ludum-dare/54/this-game-only-weights-16-kb |
Ratings
| Overall | 194th | 3.962⭐ | 28🧑⚖️ |
| Fun | 403th | 3.635⭐ | 28🧑⚖️ |
| Innovation | 117th | 4⭐ | 30🧑⚖️ |
| Theme | 3th | 4.768⭐ | 30🧑⚖️ |
| Graphics | 833th | 3.096⭐ | 28🧑⚖️ |
| Humor | 522th | 2.979⭐ | 26🧑⚖️ |
| Mood | 931th | 2.96⭐ | 27🧑⚖️ |
| Given | 33🗳️ | 2🗨️ |
The game is straightforward, short, some of levels are more challenging and interesting
What compiler flags did you use for release - did you try using the /O1 optimization flag to reduce space even further?


(or in two pages, if I unzip it)
Level 5 was super interesting, needed to sit back and think about it. Makes my puzzle-seeking brain happy.
If I remove all the text from the game (the tutorials), I can go down to 6 KB:

But I'm not shipping this version of the game. :smile:
@daniel-grinshpon thank you! I wanted to make a game that fits on a QR code or a business card as well, but it turns out that I would have to reduce it even more to be able to fit, sacrificing some cool stuff I had. For example: I can reduce it by around 2 KB if I remove all the tutorial text in the game, making it ~6KB. But then it will be considerably bad in my opinion. So I think that 8 KB is a good trade off and I'm very happy with it.
If you really want to fit it on a QR code, and if you know javascript very well, you could port it for the web. Although good luck wrestling with the Canvas API when your budget is in bytes, especially for texture generation.
Bypassing libc was interesting. I tried building it with mingw but that ended up being 24k.
Great job !