r/tinycode • u/woqr • 4h ago
tiny art challenge
create a bird using https://github.com/bacionejs/vectorbay
score=votes/curves
r/tinycode • u/woqr • 4h ago
create a bird using https://github.com/bacionejs/vectorbay
score=votes/curves
r/tinycode • u/woqr • 2d ago
This only bolds keywords: s.replace(/[a-z]+/g,x=>{try{eval("let "+x)}catch{x=`<b>${x}</b>`}return x})
For a prettier, more robust version, see: https://github.com/bacionejs/editor
Also, if you don't like the built-in GitHub code view, try this: https://github.com/bacionejs/bacionejs/blob/main/viewsource.html You can see the behavior of viewsource.html by clicking on the 3x5 cards in any of my repos.
r/tinycode • u/Slackluster • 5d ago
https://www.dwitter.net/d/36697
c.width|=0;for(j=200;j--;)for(i=500;i--;)d=C(i/20+t)*S(j/20+t)*19.8,r=((j-100)**2+(i-200)**2)**.5,d<S(r+t)&&x.fillRect(i*5,j*5,5,5)
r/tinycode
•
u/Slackluster
•
6d ago
Skydreams is an endless 3D arcade game that won first place in JS1024 2026, and the whole program is just 1019 bytes of JavaScript. In this video I build it up step by step, from a flat grid to the final packed code: the fake-3D projection, the curving road, solid blocks, the track generator, the sky, the ball, the physics, and all the tricks it took to squeeze it under 1KB.
🕹️ Play Skydreams: https://js1024.fun/demos/2026/25/bar
💾 More size-coded experiments: https://github.com/KilledByAPixel/TinyCode
r/tinycode • u/Slackluster • 9d ago
r/tinycode • u/Slackluster • 11d ago
https://www.dwitter.net/d/36676
for(c.width|=0,T=34;T--;)for(j=780;j--;x.fillRect(960+(d*C(a)-290)/(f=(d*S(a)+74)/800),580+(60-h+S(t*40))/f,T%11&&j%20|T%25<8?0:3/f,(j%20?3:h||3)/f))a=j*.003+t%.2*.3-.2,h=T%33?0:99,d=240+3*T+h*S(a*9-t*3)/5r/tinycode • u/Slackluster • 11d ago
r/tinycode • u/Wrong-Rate-1208 • 16d ago
r/tinycode • u/Slackluster • 19d ago
https://www.dwitter.net/d/36629
with(x)reset(k=0),translate(960,lineWidth=1070,globalAlpha=.8),arc(0,-620,940,0,7),stroke(),(G=h=>h>5&&G(h-1,fillRect(0,0,h/2,h,translate(0,-h,rotate(S(k*k++)/3))),restore(G(h-12,save()))))(56)r/tinycode • u/Slackluster • 20d ago
r/tinycode • u/Slackluster • 26d ago
https://www.dwitter.net/d/36580
for(i=6e4;i--;)
X=i%320-160,
Y=i/320-90,
f=(z=1.7-(X*X+Y*Y)/5e3)>.35&&1-z,
h=S(X/40/z+S(Y/30+t))+Y/60/z+t/4,
x.fillStyle=R(...[3,4,5].map(k=>k*6+Y/2+f*(S(h*k)+1)*45)),
x.fillRect(X*6+960,Y*6+534,6,7)r/tinycode • u/nexe • 27d ago
Thinking like tiny inference engines, tiny harnesses, tiny models that are still doing some cool task.
r/tinycode • u/woqr • 29d ago
This project is mainly about the serverless technique used and the simple game merely provides an end-to-end explanation.
r/tinycode • u/Slackluster • Nov 02 '26
r/tinycode • u/Slackluster • Oct 31 '26
https://www.dwitter.net/d/36567
for(i=!t<<21;i--;T=Y-X)x.fillRect(X=i%2e3,i/2e3,T>-1|R>.7,.4-(X=X/200-5,Y=i/4e5-2,R=X*X+Y*Y,R<1?R*T/2:C(e=(T-2)**2+(X+Y-.6)**2*6)/3*(e<5)))how it works...
tomxor: It's a 2D approximation in screen space of physically based ray tracing effects. The sphere, specular highlight, and a caustic shadow are drawn as three independent shapes with a painters algorithm type logic. It's very effective though, almost had me fooled.
UZE: There is no real 3D or ray tracing here. It's a 2D drawing that just pretends. Each pixel asks: ball or floor? The ball is almost as gray as the floor, with a shaded edge and a white reflection. The shadow is an oval with a bright spot in the middle, where the glass focuses the light.
r/tinycode • u/OMGCluck • Nov 01 '26
r/tinycode • u/Standard_Shake6651 • Oct 30 '26
r/tinycode • u/Slackluster • Oct 23 '26
https://www.dwitter.net/d/36534
H=a=>S((q=z/2+S(a/3)*2)-C(q)*.8);
for(X=960;X--;x.fillRect(X*2,t*120,2,1e3,x.fillStyle=z<60?R(v=170+H(a)*50+z+C(q*50)*14/z,v*.8,v/2):"#19f"))
for(z=0.5;z<60&&4+(.2-t/4)*z>H(a=(X/480-1)*z);)
z*=1.01r/tinycode • u/Main_Temporary7098 • Oct 21 '26
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 • u/_EHLO • Oct 21 '26
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 • u/kierancschmitt • Oct 20 '26
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.
r/tinycode • u/kierancschmitt • Oct 20 '26
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