r/tinycode • • Sep 04 '26

JavaScript The Depths of JavaScript: Minesweeper in 247 Bytes

Thumbnail
yui.dev
18 Upvotes

r/tinycode • • Jul 19 '26

JavaScript TinyTar.js: library for creating tar files (363 bytes gzipped)

Thumbnail git.sr.ht
9 Upvotes

r/tinycode • • Jun 05 '26

JavaScript Dweet of the Week #128 - Default Ex Nihilo by Agnes

23 Upvotes

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

for(x.reset(i=F=0);i++<9;)for(j=1e3,D=t-9*i;j--;x.fillRect(j%10*5+M(D*=D<0)+300*(i/3+1+S(D?9*i:t)+D*C(9*i)),400+j/5+M(),5,2))M=_=>D*T(j*F++)

r/tinycode • • Jul 17 '26

JavaScript Dweet of the Week #134 - Skydreams JS1024 Demo by KilledByAPixel

36 Upvotes

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

check out the actual 1k demo: https://js1024.fun/demos/2026/25/bar

for(c.width|=i=300;i--;)for(Y=t*60+i,s=(300-i)**2,X=7;X--;(X^Y>>6)%4&&x.fillRect(960-X*w+w/.4+3*S(Y/99)*i,s/80,w,s))x.fillStyle=\hsl(${(Y>>9)*90} 99% ${((Y>>4X)&1?60:9)+(Y%32>1)*30}%`,w=9+s/299`

r/tinycode • • Sep 10 '26

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

Thumbnail
remvst.substack.com
31 Upvotes

r/tinycode • • Jul 03 '26

JavaScript Dweet of the Week #132 - js1024 edition 2026 STARTED! by katkip

8 Upvotes

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

JS10124 Theme: DREAMING. Details: https://js1024.fun/

with(x)for(c.width|=i=50,font='19em impact';i--;)fillStyle=R(5*i*t,99+99*S(t+i),255,.3),fillText('js1024',520+S(t+i/5)*i*9,400+C(t+i)*i*3)

r/tinycode • • 21d ago

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

Post image
10 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 • • 11h ago

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

5 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 • • Mar 13 '26

JavaScript Dweet of the Week #116 - Bulging Checkerboard Illusion by KilledByAPixel

66 Upvotes

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

for(w=60,i=2e3;i--;x[f](X*w+30+(X>15?1:-1)*z-r,Y*w+30+(Y>8?-1:1)*z-r,r*=2,r))X=(i>>1)%33,Y=i/66|0,i%2&&x[f='fillRect'](X*w,Y*w,w,w),x.fillStyle=X%2^Y%2?R():'#fff',r=5+5*C(t-Y/9),z=(i%2-.5)*35

r/tinycode • • Oct 09 '26

JavaScript Dweet of the Week #146 - Reversiology by KilledByAPixel

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

JavaScript Dweet of the Week #136 - Welcome to the Matrix by KilledByAPixel

44 Upvotes

https://www.dwitter.net/d/35970 - tiny raycasting engine with text rendering

x.fillRect(0,0,2e3,2e3)
for(A=99;A;T+=.1)for(q=((X=t+A/(e=55/T)-T)^T)%3,i=q||(x.fillStyle=R(T=1,--A&&9*e),18);!q&&i--;x.fillText(S((i+(X*30|0)**3+t*9|0)**3)+1|0,A*19,540-(i-9)*e))x.font=e+'px"'

r/tinycode • • May 30 '26

JavaScript Dweet of the Week #127 - Daydream by SockTaters

12 Upvotes

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

for(k=315-60*C(t);X=T(Y=T(T=n=>~n*k-Y-X&2047));x.fillRect(X,Y,25,9))x.fillStyle=R(p=T(a=X-k)&&9*T(b=Y-k)<a*a+b*b?b>(a+b)**2?215:170:k,p,240)

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

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

42 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 • • Sep 13 '26

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

Post image
9 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 • • Feb 13 '26

JavaScript Dweet of the Week #112 - Pool of Blue Dots by Rodrigo Siqueira

26 Upvotes

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

c.style.filter='invert()'
for(i=836;i--;x.fillRect(i%38*50.4+5,(i/38|0)*51.5+2,w=45,w))k=S(i**3+t)**33*90+90,x.fillStyle=`hsl(30,50%,${k}%)`

r/tinycode • • Aug 07 '26

JavaScript Dweet of the Week #137 - Drainage by KilledByAPixel

54 Upvotes

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

for(i=0,w=4e3;++i<w;x.fillRect(960+C(a=q**3+t)*r,1e3+S(a)*r/2-j/4,99,99,x.fillStyle=R(r/=6+q%1.7,r/.7,r*3)))j=i-t%1*40,r=j*j/w,q=(j+t*1e3)%w

r/tinycode • • Jun 12 '26

JavaScript Dweet of the Week #129 - untitled by taupelink

Post image
32 Upvotes

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

for(i=z=1080;i--;x.fillRect(320*t,i,6,z*=1+C(i/105/p)*C(t/p)))x.fillStyle=`hsl(${6**(z&=7)},25%,${300/(z+=3-(p=(-.7)**z)*C(t+i/210*p))}%,.3`

r/tinycode • • 15d ago

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

9 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 • • Sep 25 '26

JavaScript Dweet of the Week #144 - untitled by micromobius

7 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 • • Mar 28 '26

JavaScript Basic physics engine in about 100 lines of pure JavaScript

Thumbnail
slicker.me
7 Upvotes

r/tinycode • • Jul 25 '26

JavaScript Dweet of the Week #135 - Psychedelic Trippy by Rodrigo Siqueira

18 Upvotes

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

if(!t)x.translate(960,540);with(x)for(i=40;i--;)for(j=12;j--;)fillStyle=\hsl(${i},85%,${75C(i+t)**8}%`,scale(1,1/3),beginPath(),arc((19+S(t3+j))15,0,ii,0,7),fill(),scale(1,3),rotate(.5236)`

r/tinycode • • 21d ago

JavaScript Misty Landscapes, SVGZ 1.6kb Reload for new ones

Thumbnail svgklondike.pages.dev
2 Upvotes

r/tinycode • • Apr 10 '26

JavaScript Dweet of the Week #120 - Easter Eggs by KilledByAPixel

Post image
21 Upvotes

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

for(t*=60,k=1e5;k--;x.fillRect(210+t%4*500+C(a=k/3e4)*r/2,40+(t>>2)*520+i,3,2,x.fillStyle=R(f(2),f(t),f(5))))i=k%480,r=(58e3-(i-240)**2)**.5*(i/3e3+.7)<<1,f=f=>(i/19-a*9-t*9&i/19+a*9^f+t)%7*a*27

r/tinycode • • Feb 28 '26

JavaScript Dweet of the Week #114 - Café Wall Illusion by KilledByAPixel

13 Upvotes

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

c.width|=w=99
for(i=13;i--;)for(j=12;j--;)x.fillRect(i&&(2*i-4+j%2+(j%4<3?j%4:1)*t/3%2)*w,j*w,i?w:3e3,i?w:5)