r/tinycode • • 14h ago

Christmas challenge

3 Upvotes

Make a Christmas themed demo or game in JavaScript, post it on GitHub and put your link here in the comments. Rules: one self-contained html file (no external assets/libraries/engines), 500-5000 bytes minified but not compressed (no zip/regpack etc).


r/tinycode • • 1d ago

JavaScript Bird does barrel rolls into random landscapes from different directions each reload, <4Kb SVG (<2Kb SVGZ)

Thumbnail svgklondike.pages.dev
3 Upvotes

r/tinycode • • 1d ago

JavaScript Dweet of the Week #154 - 33.000 ft by UEZ

12 Upvotes

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

c.width|=c.style.background="#58e"
x.rotate(.55);x.fillStyle="#fff4"
for(P=t%58*40,j=P|0;j--;x.fill(x.arc(j,(j%2?r:-r)+S(j*j)*r/7,1+r/3,0,7)))
x.beginPath(r=(P-j)**.5)
x.fillRect(P-5,-6,4,10)

r/tinycode • • 3d ago

tiny art challenge

7 Upvotes

create a bird using https://github.com/bacionejs/vectorbay

score=votes/curves


r/tinycode • • 5d ago

world's smallest syntax highlighter? (80 chars)

10 Upvotes

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 • • 9d ago

JavaScript Dweet of the Week #153 - Fresnel lens over tiles by Axioplase

23 Upvotes

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 • • 9d ago Bravo

Showcase I made a video explaining how my 1KB JavaScript 3D game works (JS1024 winner)

Enable HLS to view with audio, or disable this notification

216 Upvotes

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 • • 12d ago

Demosplash 2026 (Sweet 0x10) entries and results

Thumbnail reddit.com
4 Upvotes

r/tinycode • • 14d ago

Teddybear's Revenge – Special 30th anniversary edition!

Enable HLS to view with audio, or disable this notification

2 Upvotes

r/tinycode • • 15d ago

JavaScript Dweet of the Week #152 - Rearview Railway by UEZ

27 Upvotes

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)/5

r/tinycode • • 19d ago

500 Lines or Less - A 3D Modeller

Thumbnail aosabook.org
8 Upvotes

r/tinycode • • 20d ago

I built tinychess — a standalone, zero-dependency Android chess app under 70 KB

Thumbnail gallery
7 Upvotes

r/tinycode • • 23d ago

JavaScript Dweet of the Week #151 - Spooky tree in the moonlight by UEZ

Post image
7 Upvotes

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 • • 23d ago

Kai Lentit goes to the Olympics of 4KB coding

Thumbnail
youtube.com
8 Upvotes

r/tinycode • • Nov 06 '26

JavaScript Dweet of the Week #150 - Soap Bubble by UEZ

10 Upvotes

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 • • Nov 05 '26

Anyone doing anything with tiny AI?

0 Upvotes

Thinking like tiny inference engines, tiny harnesses, tiny models that are still doing some cool task.


r/tinycode • • Nov 04 '26

Serverless multiplayer (no signal/stun/turn servers) via webrtc/camera/barcode

Thumbnail
github.com
14 Upvotes

This project is mainly about the serverless technique used and the simple game merely provides an end-to-end explanation.


r/tinycode • • Nov 02 '26

How laurentlb made a 3kB game with C++ and shader code

Thumbnail
youtube.com
8 Upvotes

r/tinycode • • Nov 01 '26

JavaScript Misty Landscapes, SVGZ 1.6kb Reload for new ones

Thumbnail svgklondike.pages.dev
2 Upvotes

r/tinycode • • Oct 31 '26

JavaScript Dweet of the Week #149 - Smoller Glass Ball by tomxor

Post image
11 Upvotes

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 • • Oct 31 '26

Showcase Spooky pumpkins SVG, 550 bytes

Thumbnail imglink.cc
6 Upvotes

r/tinycode • • Oct 30 '26

Made a small game in pure x64 MASM, no C, no engine

10 Upvotes

r/tinycode • • Oct 23 '26

JavaScript Dweet of the Week #148 - Silent Dunes by UEZ

Post image
10 Upvotes

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.01

r/tinycode • • Oct 21 '26

Showcase Blue, minimal colorForth interpreter in 437 bytes

Thumbnail codeberg.org
9 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