This Game Only Weighs 8 KB! by UnidayStudio

[raw]
made by UnidayStudio for Ludum Dare 54 (JAM)

The theme was "Limited Space", so I took it quite literally.

Created by Guilherme Teres (@UnidayStudio)

ld54-screenshot-1.png

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.

Screenshot_107.png

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:

ld54-gamesize.png

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!

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🗨️

Feedback

Stronf
02. Oct 2023 · 18:54 UTC
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 299751
02. Oct 2023 · 19:10 UTC
I guess you won LD54 on a meta level
LDJam user 373644
02. Oct 2023 · 19:21 UTC
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
02. Oct 2023 · 19:26 UTC
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

![11.png](///raw/3cc/b2/z/5d908.png)
TheFoppian
02. Oct 2023 · 19:36 UTC
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
02. Oct 2023 · 21:06 UTC
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:
![image (22).png](///raw/bdc/2/z/5ddc0.png)

(or in two pages, if I unzip it)
Nozomu57
02. Oct 2023 · 21:31 UTC
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
02. Oct 2023 · 21:38 UTC
These types of creative takes are why I love game jams, great job :thumbsup:
LudumDareDevil
02. Oct 2023 · 21:45 UTC
I love your interpretation of the theme!
🎤 UnidayStudio
02. Oct 2023 · 23:04 UTC
## For anyone interested to know:

If I remove all the text from the game (the tutorials), I can go down to 6 KB:

![ld54-file-size.png](///raw/bdc/2/z/5f5eb.png)

But I'm not shipping this version of the game. :smile:
Jesús González
02. Oct 2023 · 23:11 UTC
We need a new "tech" or similar category to properly rate technically impressive games like this one.
Daniel Grinshpon
03. Oct 2023 · 01:14 UTC
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
03. Oct 2023 · 07:31 UTC
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.
MattHartley
03. Oct 2023 · 08:15 UTC
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
03. Oct 2023 · 16:16 UTC
Love your interpretation of the theme! I just have access to linux and mac, will see if I can setup a VM...
🎤 UnidayStudio
03. Oct 2023 · 16:17 UTC
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
03. Oct 2023 · 16:31 UTC
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
03. Oct 2023 · 16:51 UTC
i really loved this. couldnt get past level 5 but have been playing since the past 20 minutes and haven't even realized!
someone
03. Oct 2023 · 17:02 UTC
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
03. Oct 2023 · 17:20 UTC
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
03. Oct 2023 · 18:56 UTC
@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
04. Oct 2023 · 04:41 UTC
Nice! Love the idea. That is a very tiny sokoban.
FiveCyclops
04. Oct 2023 · 10:55 UTC
Incredible ! Good levels.

Great job !
jebouin
06. Oct 2023 · 01:14 UTC
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
09. Oct 2023 · 09:55 UTC
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
10. Oct 2023 · 12:25 UTC
As always congratulations! Guilherme Great! work
PSV Games Studio
14. Oct 2023 · 01:07 UTC
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
20. Oct 2023 · 20:07 UTC
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
20. Oct 2023 · 21:31 UTC
@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: