r/tinycode • • 2h ago

Showcase Blue, minimal colorForth interpreter in 437 bytes

Thumbnail codeberg.org
3 Upvotes

Just stumbled upon this sub and thought this might be of interest (if nothing else once you see where the data stack is stored you may lol a little). It is an interpreter for my colorForth dialect in 172 lines of non code-golfed x86_64 asm. Assembles with fasm to 437 bytes of unsafe as hell fun. Probably could be smaller but I've mainly been focused on the simplicity of the entire system.

In Blue each program starts with a completely clean slate, there are no built in words. So using the colors:

red word: define label

green word: compile call/jmp to word in output

green number: write number to output

blue word: execute word at assemble time

blue number: push number onto the data stack

magenta word: push address of word onto the data stack

You dsl yourself an artisanal binary, brick by brick. Blue source is binary bytecode, so here are some html views of what a program might look like. The first is non typical, but is likely the most minimal Blue program that emits a valid binary. 124 byte version of `/bin/true`:

https://jbirddog.codeberg.page/blue/example/x86_64/true.b.html

However this is more representative of an actual Blue program and shows how one goes from hand jit'ing with green numbers to higher level words, macros, variables and assemble-time execution of user defined words. This yields a 129 byte binary:

https://jbirddog.codeberg.page/blue/example/x86_64/true2.bl.html


r/tinycode • • 6h ago

Showcase Computer Vision on an 8-bit MCU

Thumbnail
github.com
4 Upvotes

TL;DR; 472 bytes of microcontroller's internal EEPROM, are used for the (472 int8-quantized) parameters of a Recurrent Neural Network (RNN) that predicts what a handwritten-digit is with 95% accuracy under 6kb of programmable memmory.

It uses a quite complex but user-friendly Neural-Network library in the background (that I'm working on since 2019). The library itself mostly consists out of macros\preprocessor-directives, boiling down to compactness\tiny-code via user-defined optimization preferences. That said, it still isn't perfect and it still carries some "weakness" from the past I had no time to work on.

This project serves as an "anecdotal"-example or more like a proof-of-concept for what the library is capable for and how small it can get via the optimizations (but I wouldn't say that the project itself is something really practical besides showcasing some kind of a limit for computer vision on 8-bit MCUs). That said it also runs on PCs natively too.

I thought you might find it interesting and therefore I decided to post it here as well. Hope you find it interesting, feel free to ask me anything about it and maybe have fun with it?

idk. I just felt the need to share it. Maybe I wanted to feel noticed again or something. The sure thing is that I'm being genuine with what I'm saying right now or I guess...?

PS. I hope it is relevant to the subreddit too lol


r/tinycode • • 1d ago

Showcase Minecraft in 512 bytes

75 Upvotes

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/


r/tinycode • • 1d ago

Showcase A black hole renderer in 512 bytes of HTML/JS

13 Upvotes

I just posted my Minecraft version in 512 bytes (check it out if you haven’t already!), which was my first project under the 512 byte challenge. My second project is this black hole renderer. It renders an animated disk around a black hole, including light bending and gravitational/Doppler shifts.

It’s a simplified model with a thin disk and prescribed motion. The whole compact HTML file is 512 bytes, using the browser’s Canvas.

Code here:

https://kierancschmitt.github.io/BlackHole512/program/blackhole-preview.html


r/tinycode • • 4d ago

Raycasting in 512 bytes : Fits in a boot sector

Post image
15 Upvotes

r/tinycode • • 5d ago

JavaScript Dweet of the Week #147 - Zebra Hills by UEZ

43 Upvotes

https://www.dwitter.net/d/36459

for(z=3+S(t/2),i=-98;i++<9;)for(X=0;X<2e3;X+=4)x.fillRect(X,1080-(4/z*C(a=z/2*(X/274-S(i*.1653+t)))-i/6-t*6%19/3)*154,4,2e3,x.fillStyle=R(v=(i&1)*(180-76*S(a)),v,v))

r/tinycode • • 6d ago

X-Post: I built a 1.22 MB disassembler that runs entirely offline in a single HTML file

Thumbnail gallery
12 Upvotes

r/tinycode • • 6d ago

Very primitive raycasting renderer in 10 lines of C

Thumbnail gallery
2 Upvotes

r/tinycode • • 10d ago

Resource Asteroid collection in timelapse 649 bytes, SVG

Thumbnail imglink.cc
4 Upvotes

r/tinycode • • 12d ago

Glimmer - A chess engine under 30,000 bytes (estimated 2700–2900 Elo)

Thumbnail
github.com
25 Upvotes

Hi everyone,

I’ve been messing around with a tiny experimental chess engine written in pure C called Glimmer.

The whole idea was to see how strong I could push it while keeping the final binary strictly under 30 KB. I was aiming for something in the 2700–2900 Elo range.

Unlike those ultra-minimal engines that pack themselves into self-extracting shell scripts and then call the host’s compiler at runtime, Glimmer is a real standalone native binary — just pure machine code, nothing else.

It’s been a really fun (and sometimes painful) constraint to work under. Every single byte counts.

Happy to answer questions if anyone’s curious about how I approached it!


r/tinycode • • 12d ago

JavaScript Dweet of the Week #146 - Reversiology by KilledByAPixel

6 Upvotes

https://www.dwitter.net/d/36395

with(x)for(a=3-S(t),i=0;i<40;beginPath(fill(ellipse(960+i*3,...i>9?[600-i*3,r=540,r/a,95]:[950,r,r/7,0],0,9))))fillStyle=i?i>9?R(v=i>37?315-a*30:i>23&&a*70,v,v):'#0001':'#174',r=i++?i*29+199:2e5

r/tinycode • • 17d ago

"8-pinski" - EIGHT(!) bytes intro for MSDOS

Thumbnail
youtube.com
14 Upvotes

r/tinycode • • 18d ago

"8-pinski" - sierpinski animation + bytebeat in EIGHT bytes x86 code

20 Upvotes

"8-pinski" Download

Youtube Capture

X: lds si,[bx+si]

add al,0xad

out 61h,al

jmp short X+1


r/tinycode • • 19d ago

JavaScript Dweet of the Week #145 - Symbiotic Spirals by Rodrigo Siqueira

Post image
5 Upvotes

https://www.dwitter.net/d/36347

for(X=Y=i=4e4;i--;x.fillRect(Y*80+960,X*230+410,t<2,.2))u=X*2-3,r=(u*u+Y*Y)**.5,s=T(i*i/t)<.95||-.8,X=s*(r+u)/4+S(X),Y=s*(r-u)**.8*(Y<0||-1)

r/tinycode • • 22d ago

Showcase It may not be small, but it *does* have a low line count!

Post image
8 Upvotes

r/tinycode • • 26d ago

JavaScript Dweet of the Week #144 - untitled by micromobius

8 Upvotes

https://www.dwitter.net/d/36313

c.width|=0;x.fillStyle='#f36';p=33+S(t*5)**8*4;for(a=t%8;a>0;a-=.01)x.fillRect(960+p*16*S(a)**3,450-p*(13*C(a)-5*C(2*a)-2*C(3*a)),p/6,p/6)

r/tinycode • • Sep 18 '26

JavaScript Dweet of the Week #143 - Ripple remix hi-res by danny@hille.dk

14 Upvotes

https://www.dwitter.net/d/36287

//HI-RES!
for(t?i=w*w:I=new ImageData(c.width=w=255,w);i--,a=4-(i%w)/32,b=i/8160;I.data.set([d=13/(S(a*a+(b-=2.25)*b-t)-C(a+b)*S(b+a)-C(a-t))**2,d*2,d*9,w],i*4));x.putImageData(I,0,0)

r/tinycode • • Sep 15 '26

Showcase every song in my 13kb game is generated from a single number

Enable HLS to view with audio, or disable this notification

64 Upvotes

here's the trick behind how i fit 8 music tracks in my js13k game SP13KTRA. 🌈🚀

every song is defined by a single number. the seeded random generator makes 26 dice rolls per track: tempo, key, scale, chords, groove, drum kit, bass and lead sounds, melody patterns, when each part comes in, and a few more.

each song is a 128 beat loop split into sections. parts come in one by one, a resonant filter sweeps open every phrase, then there's a breakdown and a drop.

notes use one of 4 predefined scales so nothing clashes. the melody climbs, falls, leaps or rocks through the scale, and the chords shift every 4 bars. there's no note data, it's all math on the beat count.

there are 6 ZzFX instruments plus echo and sidechain. the whole loop gets baked into one buffer when the level loads.

the music itself is all rules and seeds, not AI. i did use AI to help build this bench so i could listen through seeds and pick a good one for each level.

play it free in your browser and hear all the music. i designed it to be kind of like a music album in addition to a game.

https://js13kgames.com/2026/games/sp13ktra

The music bench tool is also available to check out on GitHub.

https://killedbyapixel.github.io/SP13KTRA/tools/music.html


r/tinycode • • Sep 15 '26

Showcase Helpful Windows command line utility in 4 kB

Thumbnail
github.com
4 Upvotes

This is a Windows command line program written in under 100 lines of C that compiles to a 4 kB executable with no dependencies other than the operating system. It allows you to send files and directories to the recycle bin on the command line, allowing you to be safer than the del or rd commands which permanently delete files. I find a tool like this to be indispensable when doing a lot of work on the command line, as it can prevent very costly mistakes.

It's a fork of another project that does the same thing, but it's kind of a Ship of Theseus situation now where not much code from the original project remains. I removed any use of the C runtime, allowing it to compile to a tiny 4 kB executable. There are some tricks you can use to make it even smaller, but this seemed good enough to me

Take a look at the readme on the Github page for more details


r/tinycode • • Sep 13 '26

JavaScript Dweet of the Week #142 - untitled by Rodrigo Siqueira

Post image
7 Upvotes

https://www.dwitter.net/d/36264

for(i=1200;i--;x[i%223?'stroke':'fill']())x.beginPath(x.strokeStyle=R(i,i/4,9,.7)),x[i<650?'arc':'rect'](i*(i-t)%2200,i*i%1800-i,i,i,i+7)

r/tinycode • • Sep 10 '26

JavaScript How Rémi Vansteelandt made a physics-based BMX game in under 13 kilobytes

Thumbnail
remvst.substack.com
29 Upvotes

r/tinycode • • Sep 04 '26

JavaScript Dweet of the Week #141 - Uptown by KilledByAPixel

26 Upvotes

https://www.dwitter.net/d/36205

for(k=0;k<39;k++)for(i=64;i--;)for(j=18;j--;6-k/9<((t+i)/5^j/9)%9&&j%11<7&&x.fillRect(k&&(i-32-t%1)*S+960,k&&(j-9)*S+540,S=k?2**(2+k/12)*9:2e3,S))x.fillStyle=k?R(v=220-(t+i|k|j)%3*S,v,v):'#7bf'

r/tinycode • • Sep 04 '26

JavaScript The Depths of JavaScript: Minesweeper in 247 Bytes

Thumbnail
yui.dev
17 Upvotes

r/tinycode • • Sep 01 '26

Make emojis blink automagically

23 Upvotes

r/tinycode • • Aug 28 '26

JavaScript Dweet of the Week #140 - Looking Up by KilledByAPixel

Post image
20 Upvotes

https://www.dwitter.net/d/36150

for(i=199;t<6&&i--;)for(j=99;j--;6-t<(i/17|j/15)%7&&x.fillRect((i-99)*S+960,(j-51)*S+540,S,S=2**t*5))x.fillStyle=R(v=200-(j|i|t*16)%9*S,v,v)