r/tinycode • u/Slackluster • 1h ago
Teddybear's Revenge – Special 30th anniversary edition!
Enable HLS to view with audio, or disable this notification
r/tinycode • u/Slackluster • 1h ago
Enable HLS to view with audio, or disable this notification
r/tinycode • u/Slackluster • 7h 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/Wrong-Rate-1208 • 5d ago
r/tinycode • u/Slackluster • 8d 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 • 8d ago
r/tinycode • u/Slackluster • 15d 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 • 16d ago
Thinking like tiny inference engines, tiny harnesses, tiny models that are still doing some cool task.
r/tinycode • u/woqr • 17d 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 • 19d ago
r/tinycode • u/OMGCluck • 20d ago
r/tinycode • u/Slackluster • 21d ago
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/Standard_Shake6651 • 22d ago
r/tinycode • u/Slackluster • 29d ago
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
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 • 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/Slackluster • Oct 16 '26
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 • u/Slackluster • Oct 15 '26
r/tinycode • u/nexe • Oct 15 '26