Thomas Brierley retweeted
Please enjoy this short video I made showcasing the top 10 Dwitter Programs of 2023! 🏆👍 #dwitter #javascript #tinycode #generativeart #programming
194 byte Floyd Wolfensteinberg
dwitter.net/d/27957
for(c.width&=i=8320;i;C=C-64+S|0)(S/64*R-R+C/3e6^R+3*t)%7?R*=1.02:x.fillRect(S=i>>6,Y=i&63,q=0|(p=(x[--i]+=7*T)+(Y/32*R-R|0?Y/128:1-1/R)),Y?1:R=1,T=(p-q||0)/16,x[u]+=3*T,x[u=i-64]+=5*T,x[u-1]=T)
194 byte Soldering Simulator
dwitter.net/d/27941
for(t?w=c.width&=i=10368:m=onmousemove=e=>m=e;X=--i%w,Y=i/w;x.fillRect(X+z*R,Y+z*T,S=Math.hypot(R=X/64-m.x/280||0,T=Y/64-m.y/280||1)+!z/2,1))z=(w+X/3-Y/3^Y/3+X/3)%21>18,z+=u[i]|=m.buttons/S/48&2
6
362
194 byte Doom Bumpmap Textures
dwitter.net/u/tomxor
for(c.width=A=128;A;(X^R)%7>1?R+=.01:T++<48?x.fillRect(A-z*u*(R*8&7?-3:3),36+T/R-z*C*3,Math.hypot(u,C=T/96+S(t)/2)*(1-.6/R)+z/2,2/R):(u=--A/64-1,R=1,T=-48))X=R*u+t+2,z=(X+R)*16,z=(z-T^T+z)%7>5
Thomas Brierley retweeted
A tiny windy tree by @tomx0r and me! 💨🌳
dwitter.net/d/26208 #javascript
f=(X,Y,Z,A)=>x.fillRect(X,Y,w=Z<.3?4*Z:Z,w,Z>.2&&f(X+Z*S(A),Y-Z*C(A),Z*.95,A+C(9*t/Z+n/Z+2*t+2*n)/Z/8),Z*3%1>.8&&f(X,Y,Z*.8,A+9*Z%2-1,n++),x.fillStyle=`#${6*Z<<5}`);c.width=320;f(160,200,11,n=0)
194 byte Lava Field
dwitter.net/d/26139 #javascript #demo
for(f=k=>C(5*S((Z=2e4/p/k)/3+C(X=Z*(p/64%2-1)+t/k))+5*S(X/3+S(Z)))**3,c.width=p=w=128;++p<2e4;x.fillRect(p%w,p/w,1,(9*A-T)*p/4e3-9))A=f(.3),B=f(3),x.fillStyle=R(T<1?A*w+256:T,T,T=9*A+9*B+9+A*B)
10
194 byte Spherical Laundry Simulator
dwitter.net/d/25759 #javascript #demo
for(t?w=c.width&=i=8320:A=B=U=V=k=32;i--;T=2*C(6*Math.atan2(X-=64,Y-=k)-w*C(t/2))+X*X/w+Y*Y/w>5)x.fillRect(X=i%w,Y=i/w,1,T|R<0),a=X-A,b=Y-B,R=a*a+b*b-k,T&R<0&&(U-=a,V-=b);A+=U/k,B+=V/k,V+=7-V/5
Trace program dwitter.net/d/25497 #javascript #TheMatrix #demo
for(c.width=640-20*t,c.style.filter='invert(',i=2e3;i--;x.fillText('0623419587'[X%10]<t/3-1?'3125550690'[i]||'':Y?d%10:'',X*12-2*t,++Y*12))X=i&63,x.fillStyle=R(d=t*3840-i|0,Y=i>>6,d,X*d/99%1+.4)
for(c.width&=i=10386;i--;x.fillRect(X=i&127,Y=i>>7,1,!f(64)|!f(32,Y=X,X=i>>7)))f=s=>Math.round((q=(X&120)-s)/(1+1e4**S(t+q%7)**7))+Y&7
dwitter.net/d/25379
Based on dwitter.net/d/25365 by Pavel
Based on xitter.cf/beesandbombs/status/13… by @beesandbombs
4
#hackernews Avatars in 357 bytes
Deterministic avatar generator from username seeds with an xorshift32. Generative concepts used were inspired by and derived from dweets from @KilledByAPixel
news.ycombinator.com/item?id…
1
Sand 🐜 Ant Farm dwitter.net/d/25111 #javascript #physics #demo
for(w=c.width&=i=8320;i--;p&!u[r=i+w+(i*t^X)%3-1]&&--u[i]&++u[r])p=u[i],x.fillRect(X=i%w,Y=i>>7,.5,u[i]=C(5*S(t/7+Y/18+C(X/6))+5*S(t/13+X/18+S(Y/6))+t/17)<.6?2:p&1|p/2&X)
Real-time, ray-marched, 3D global illumination... on a single CPU... in JS... in 320 bytes... Too big for Dwitter, but I'm still pretty happy with the results:
The lighting is forward ray-marched, starting with a pseudo random unit vector from a source. Upon intersection, intensity is added to the the closest voxel address on an object. It marches back once to ensure the next ray has full range, gets a new unit vector, and recurses.
1
1
Impossible Marble dwitter.net/d/23413 #javascript #physics #demo
for(t?w=c.width&=i=8320:(A=B=8,U=V=0);i--;k=T&R<5?.25-R/20:0,U-=k*a,V-=k*b)x.fillRect(X=i%w,Y=i/w,1,T|R<5),T=S(X/6)+C(Y/6)+Y/6>8,R=Math.hypot(a=X-A,b=Y-B);A+=U,B+=V,A+=w,A%=w,V+=.125
"This Thing" Capturing a Marble dwitter.net/d/23415 #javascript #physics #demo
for(t?w=c.width&=i=8320:A=B=U=V=0;i--;k=S&R<5?.125-R/40:0,U-=k*a,V-=k*b)x.fillRect(X=i%w,Y=i/w,1,S|R<5),S=T(T(C(X/10)*C(Y/9+t)))<Y/9-3+3*C(t),R=Math.hypot(a=X-A,b=Y-B);A+=U+w,B+=V*=.9,A%=w,V+=.1
My latest raymarching, character crushing fun. Frank caped and posted for me.
Descending a #minecraft cave by tomxor ⛏️🤯 dwitter.net/d/22883 #javascript
t?c.width=w=64:X=Y=Z=R=5;for(a=S(R),b=C(R),p=3e3;p--;X-=k*a,Z-=k*b,Y+=k*B,R-=k*A,x.fillRect(p%w,p/w,1,2-4/d))for(A=p%w/32-1,B=p/1e3,d=1;(X+d*A*b-d*a^Y+d*B^Z-d*A*a-d*b)%15>1;d+=.1)k=1e-4-3e-4/d/d
1
4


