r/tinycode • • 1d ago

Showcase Minecraft in 512 bytes

Wanted to see how much I could squeeze into one boot sector. You can fly around, break blocks, and build stuff.

The game binary is exactly 512 bytes. There’s a browser demo with a separate emulator so you can just open it and play. No saving or survival mechanics, might see if I can fit in saving later though (please let me know if you find ways to save a few more bytes to help me do this!)

Lmk what you think.

https://kierancschmitt.github.io/PocketCraft512/

71 Upvotes

18 comments sorted by

3

u/ObtuseBagel 1d ago

oh, this is cool. I’m gonna look at it and see if I can find something to optimize

4

u/ObtuseBagel 1d ago

ah it’s AI. i’ll still try ig

-3

u/kierancschmitt 1d ago

whats make you say that?

3

u/ObtuseBagel 1d ago

Commit messages, code comments, GitHub profile. i did find a couple savings so ima open an issue in a bit though

6

u/kierancschmitt 1d ago

Oh yeah ai did do those. Most of the code is hand written though, besides a fix to the shading system for the “fog” effect which I couldn’t get under the 512 byte limit (I think I was 50 or so over). Looking forward to your feedback!

4

u/ObtuseBagel 1d ago

sounds good! Also I see you're a chapel hill student cool I'm @ ncsu lol

3

u/kierancschmitt 1d ago

Oh nice, NCSU has a really nice campus.

2

u/ObtuseBagel 1d ago

Update: I have cut over 100 bytes :)

1

u/kierancschmitt 1d ago

Nice! Where did you find those bytes? Im guessing it was the movement key table just because it felt like an ineffective way of doing it.

1

u/ObtuseBagel 1d ago

i made a little MD. i kinda lied actual savings are 85 bytes and opened a pr

1

u/ObtuseBagel 1d ago

there are a lot of different areas I found small savings in

1

u/kierancschmitt 1d ago

sent you a dm

2

u/blinry 1d ago

Commits now seem to have been squashed, maybe to hide the AI usage? :/ Didn't see them before.

2

u/ObtuseBagel 1d ago

Yeah... there were 3 but squashing AGAIN is not a great look...

4

u/kierancschmitt 1d ago

Yeah, I removed it. I spent awhile on this project and don’t want people assuming it’s all AI generated because of commit pattern and the fact I had it redo my code comments.

1

u/ObtuseBagel 1d ago

I am pretty impressed at your ability to market your projects though, I see posts on your X, linkedin, and here at a minimum. def something im not as good at

1

u/deftware 1d ago

Super impressive.