This Game Only Weighs 8 KB!

Overall★★★★★★★★★★3.96
Fun★★★★★★★★★★3.63
Innovation★★★★★★★★★★4.00
Theme★★★★★★★★★★4.77
Graphics★★★★★★★★★★3.10
Humor★★★★★★★★★★2.98
Mood★★★★★★★★★★2.96
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 `cl` and `link`)
- Navigate to this project's root folder
- Type `make`

Enjoy it!

Comments29

Stronf2 Oct 2023, 18:54
very peculiar interpretation of "limited space", couldn't have thought of it, nicely done
The game is straightforward, short, some of levels are more challenging and interesting
LDJam user 3736442 Oct 2023, 19:21
Cool little game (literally!) Some of the levels are actually surprisingly difficult!

What compiler flags did you use for release - did you try using the /O1 optimization flag to reduce space even further?
Corporation
Corporation2 Oct 2023, 19:26
I actually really enjoy this type of theme implementation, very outside of the box. Also I'm kinda respect when games are created with limited instruments and resources. This is something I do in some way. And thank you for the last level, I was already scared after 5th XD
TheFoppian
TheFoppian2 Oct 2023, 19:36
I concur with Stronf above me. I saw your post and was intrigued by the concept. It's a fun, challenging sokoban game, and while it's not particularly innovative, it's a solid game and the fact that it's under 16kb is very impressive.
UnidayStudio
UnidayStudioauthor2 Oct 2023, 21:06
Fun fact: Now that the game is 8 KB and zipped is 4, I can fit the entire thing (zipped), in HEX, in a single A4 printable page:

(or in two pages, if I unzip it)
Nozomu57
Nozomu572 Oct 2023, 21:31
Never before I wanted to rate 6/5 for theme so badly :D Great job!

Level 5 was super interesting, needed to sit back and think about it. Makes my puzzle-seeking brain happy.
zanagi
zanagi2 Oct 2023, 21:38
These types of creative takes are why I love game jams, great job :thumbsup:
LudumDareDevil
LudumDareDevil2 Oct 2023, 21:45
I love your interpretation of the theme!
UnidayStudio
UnidayStudioauthor2 Oct 2023, 23:04

For anyone interested to know:


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:
Jesús González
Jesús González2 Oct 2023, 23:11
We need a new "tech" or similar category to properly rate technically impressive games like this one.
Daniel Grinshpon
Daniel Grinshpon3 Oct 2023, 01:14
Super impressive, probably the coolest application of the theme I've seen so far. I wonder if you can fit the game on a qr code?
moonlightbomber
moonlightbomber3 Oct 2023, 07:31
I love the fact that you took the theme and interpreted it as "limited disk space". Surely, with the hex code you gave, it can be ported to pretty much anything nowadays.
MattHartley3 Oct 2023, 08:15
Amazing! I love the idea of doing a small executable for this theme. And on top of that the game was really fun as well. Great job!
Martin183
Martin1833 Oct 2023, 16:16
Love your interpretation of the theme! I just have access to linux and mac, will see if I can setup a VM...
UnidayStudio
UnidayStudioauthor3 Oct 2023, 16:17
Thanks everyone for the amazing feedbacks! @ralian I have the source code linked with the game (it's on my github) and you can check the Makefile, but yes, I've used a lot of compiler flags and tricks to optimize it even more. One of the coolest ones is to not use LIBC (the default C library, that have important stuff like malloc, free, rand, memcpy and so on). I had to implement my own versions of those functions using the Windows APIs. It was a very interesting experience!

@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.
cagibi
cagibi3 Oct 2023, 16:31
Impressive game! ~~Looking forward to receiving the stack of punch cards by postal mail~~

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.
TheCaptainBuster
TheCaptainBuster3 Oct 2023, 16:51
i really loved this. couldnt get past level 5 but have been playing since the past 20 minutes and haven't even realized!
someone
someone3 Oct 2023, 17:02
Nice sokoban implementation. A couple of the levels were tricky.
Bypassing libc was interesting. I tried building it with mingw but that ended up being 24k.
Ezard94
Ezard943 Oct 2023, 17:20
Very nice game, the fact that you're used the game size to fit the theme is such a good idea ! Overall a very pleasant experience.
UnidayStudio
UnidayStudioauthor3 Oct 2023, 18:56
@someone thanks! Interesting to know that you tried it on mingw. Did you replicate the flags I used for msvc? They will certainly make a lot of difference in the executable size, specially the optimizations and the defaultlib removal. Let me know!
Jahwffrey
Jahwffrey4 Oct 2023, 04:41
Nice! Love the idea. That is a very tiny sokoban.
FiveCyclops
FiveCyclops4 Oct 2023, 10:55
Incredible ! Good levels.

Great job !
jebouin
jebouin6 Oct 2023, 01:14
Very original take on the theme, and it runs perfectly on linux with Wine. I agree we need a new "technical" category for entries like these!
DeadByDeath
DeadByDeath9 Oct 2023, 09:55
My friend, you are crazy! :smile: I will print it to a A4 page to give it to my friends to play it :tongue:
Hora-Timer
Hora-Timer10 Oct 2023, 12:25
As always congratulations! Guilherme Great! work
PSV Games Studio
PSV Games Studio14 Oct 2023, 01:07
Amazing! I loved the Idea, besides the size, the gameplay is really fun, the way you interpreted the theme is incredible, I would never have thought of that. Great job!
Ava Skoog
Ava Skoog20 Oct 2023, 20:07
Really good use of the theme! Game itself while not original is fun, since the original game is fun :p You did good designing levels, quite hard already by levels 3 and 4. It was a little wonky tho, the graphics wobbled and the occasional frame was completely artifacted, and the cursor was showing loading icon constantly when hovered over the window as if the program wasn't responding, so might want to look into that 😅 Otherwise enjoyable! But the main attraction here is of course the meta.
UnidayStudio
UnidayStudioauthor20 Oct 2023, 21:31
@ava-skoog Thanks! Regarding the bugs, I had to remove so many code for it to fit in such a small executable file, that some of them where sort of hard to completely get rid of without adding back some Kbs. :smile:

Other games by @unidaystudio

Found a bug?
Tell us on Discord