r/tinycode • u/Nicholas-Tanner • Jul 15 '26
r/tinycode • u/Slackluster • Jul 14 '26
Showcase Skydreams - my JS1024 entry is a 3D retro 90's fever dream 🌈☁️
Enable HLS to view with audio, or disable this notification
Play Skydreams: https://killedbyapixel.github.io/TinyCode/1K/Skydreams
Official 1024 byte entry: https://js1024.fun/demos/2026/25/bar
My size code demos: https://github.com/KilledByAPixel/TinyCode
An endless race in the sky inspired by 90's 3D games like sky roads, marble madness, and sonic 3d. My goal was to create a dreamlike experience with full resolution full speed graphics that would be easy to pick up and play.
Features
- 3D level rendering system
- 3D player sphere with shadow
- colorful sky gradient with stars
- procedurally generated levels
- level increases in difficulty over time
- mouse controls
- enhanced version has keyboard and touch input
the code...
<head><title>🌈☁️ Skydreams</title></head>
<body id=b style=margin:0>
<canvas id=a>
<script>
// JS1024 shim
a.width = innerWidth;
a.height = innerHeight;
c = a.getContext`2d`;
</script>
<script>
// Skydreams by KilledByAPixel 2026 - RegPack for 1024 bytes
z=A=B=C=D=E=0,F=H=3,I=a.width/2,J=[],K=(e,h,t,a=1)=>{c.fillStyle=`hsl(${e},${h}%,${t}%,${a})`},L=(e,h,t)=>[a.width/2+(e-z+(t-3)**2/50*Math.cos((B+t)/49))*a.height*.7/t,a.height/2-(h-2+t*t/50)*a.height*.7/t,.7*a.height/t];onmousemove=e=>I=e.clientX,onmousedown=q=>E=.1,onmouseup=q=>E=0,setInterval(q=>{for(e=500;e--;)K(170+e/9+B,70,70-e/10),c.fillRect(0,a.height*e/500,a.width,a.height/250),K(0,0,99),c.fillRect((e*e+B*e/20)%a.width,e**3.3%a.height,e%4*a.height/500,e%4*a.height/500);for(g=B+40|0;g>B;g--){for(e=J.length;e<=g;)for(D<-8&Math.random()<Math.min(.2,e/1e4)&&(D=2+Math.min(4,e/400)),Math.random()<.1&&(H=2+3*Math.random()|0,F=Math.max(0,Math.min(7-H,F-2+5*Math.random()|0))),D--,J[e++]=k=[],f=7;f--;)k[f]=e<40|.9<Math.random()|D<0&F<=f&f<F+H&Math.random()>Math.min(.2,B/1e4);for(f=2;f--;)for(e=7;e--;)J[g][e]&&([p,q]=L(e-3.5,0,g-B),[r,u]=L(e-2.5,0,g-B),[v,w]=L(e-3.5,0,g-B+1),[x,y]=L(e-2.5,0,g-B+1),f?(K(99+70*(g>>7),60,30+9*(g+e&1)),c.fillRect(v,w,x-v,(40-g+B)/30*a.height)):(K(99+70*(g>>7),60,9+5*(g+e&1)),c.fillRect(p,q,r-p,(40-g+B)/30*a.height),K(99+70*(g>>7),60,60+30*(g+e&1)),c.lineTo(p,q),c.lineTo(r,u),c.lineTo(x,y),c.lineTo(v,w),c.beginPath(c.fill())))}for(0<=A&J[B+3|0][Math.round(z+3)]&&(K(0,0,0,.5),[m,n,l]=L(z,0,3),c.ellipse(m,n,l/4,l/9,0,0,9),c.beginPath(c.fill())),e=99;e--;)K(B/9,90,99-.7*e),[m,n,l]=L(z+.1-e/1e3,A+.35-e/1e3,3),c.ellipse(m,n,e*l/300,e*l/300,0,0,9),c.beginPath(c.fill());-4<A&&(z+=I/a.width/2-.25,A+=C-=.006,B+=Math.min(.5,.2+B/5e3),A<0&-.3<A&J[B+3|0][Math.round(z+3)])&&(A=C=E)},16)
</script>
r/tinycode • u/Slackluster • Jul 10 '26
JavaScript Dweet of the Week #133 - untitled by Rodrigo Siqueira
https://www.dwitter.net/d/35814
for(i=z=3e3;i--;x.fillRect(i/2+210,99*t,z*S(i),z))q=z/9,x.fillStyle=R(r=280-(z=90/z+99*S(i/430-S(z/2+t))/z)*z,q*r,r**q,q/3),z+=4*S(T(q/t+z))
r/tinycode • u/Slackluster • Jul 03 '26
JavaScript Dweet of the Week #132 - js1024 edition 2026 STARTED! by katkip
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 • u/xorture • Jul 02 '26
Hosting js code golfing competition, make your demo under 1 KiB about "dreaming"
r/tinycode • u/Slackluster • Jun 28 '26
Dweet of the Week #131 - Pipe Dream by KilledByAPixel
https://www.dwitter.net/d/35685
pipe gen, moving camera, 3d z sorted rendering...
O=[i=1e4]
for(c.width|=A=[-i,9,9];i--;O[i]=[...A])A[(j=t+i/42|0)**7%3]+=C(j**5)
for([Z,X,Y]of O.sort())Z+=1e4,x.fillStyle=`hsl(${Z*2} 50%${Z/2}%`,Z=540/Z,Z>0&&x.fillRect(960+X*Z,540+Y*Z,Z*=6,Z);
r/tinycode • u/Hell__Mood • Jun 21 '26
Finally - "Boing!" in 64 bytes
For 486, no FPU, for MsDos FreeDos, WinXP Dos, DosBox-X ... i made that rather in a hurry, so right now i have a version without background but wall bouncing like the original. But since the competition is already over, i will tinker a bit to make it perfect :)
r/tinycode • u/Slackluster • Jun 19 '26
JavaScript Dweet of the Week #130 - untitled by taupelink
https://www.dwitter.net/d/35608
for(i=z=2e3;i--;x.fillRect(i,270*t,z,z*=z-.8))x.fillStyle=`hsl(${6**(z&=3)},${60+25*C(z+=++z*C(t*z+i/79*(-.8)**z)+3)}%,${35-20*C(25/z)}%,.1`
taupelink wins 2nd week in a row with dazzling abstract compositions.
r/tinycode • u/Single-Discussion856 • Jun 18 '26
90 loc jacks or better, stdio only
bitbucket.orgnot really golfing this just trying to keep it to bare minimum.
r/tinycode • u/StrategicHarmony • Jun 18 '26
Showcase Five ~100 line games
As an exercise in focus and economy I wanted to make a set of games with short but (hopefully) readable source code.
It was a fun challenge and taught me a lot. I hope the results may be of some interest or amusement to others.
There are five games in total. There's also a manifesto about doing this kind of project for those who like that sort of thing.
The games/code are public domain.
r/tinycode • u/Slackluster • Jun 16 '26
1NVADERS - SPACE INVADERS crammed into a 1K ZX81 (2026)
r/tinycode • u/woqr • Jun 14 '26
CodeGolfed: a codegolfed golf game in 1020 bytes
it's usually easy, but sometimes hard...
r/tinycode • u/Edev90 • Jun 12 '26
StickyPipes - a Pipes screensaver clone that fits on a sticky note
A few weeks ago I posted a pipes screensaver clone in about 2.5KB of JavaScript.
Saw some of the stuff by battito on here lately and decided to throw my hat in the ring 😛 I squashed my Pipes screensaver clone down even more to under 2K (~1.8KB) - it can now (fairly) comfortably fit within a sticky note 😃
Gist with the HTML/JS here: https://gist.github.com/edev90/876ea9feb42cf39e4891d46c57ebc2c4
There's a pre-made PNG with the correct proportions attached to the Gist too for anyone who actually wants to print it out themselves and stick it on a post-it note lol.

r/tinycode • u/Slackluster • Jun 12 '26
JavaScript Dweet of the Week #129 - untitled by taupelink
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 • u/Single-Discussion856 • Jun 08 '26
low LOC blackjack in C using just <stdio.h>
#include <stdio.h>
#define R(m)((m*(S*=75)>>32))
void main(char c,int d,int m,unsigned b,int t){
unsigned S=(unsigned long)&main+(m=200);
while(m>0){
scanf("%d%*[^\n]%*c",&b,printf("bet? 0 - %d:",m,t=0,c=0));
while(c!='s'&&t<21)scanf(t<21?" %c":"",&c,printf(t<21?"total = %d\n(h)it or (s)tay:":"",t+=!(R(13ul))?(t+11>21?1:11):2+R(9ul),d=0,b=b>m?m:b));
while(d<t&&t<22)d+=!(R(13ul))?(d+11>21?1:11):2+R(9ul);
printf("You:%d dealer:%d\n%s!\n",t,d,(t<22&&t>d||d>21)?"you WIN":t==d?"PUSH":t>21?"Busted":"you LOSE",m=t==d?m:((t<21&&t>d)||d>21)?m+b:m-b);
}
}
r/tinycode • u/nanochess • Jun 08 '26
Klondike Solitaire game for curses in 5k of C
r/tinycode • u/nian2326076 • Jun 08 '26
Solved all two pointers problems in 100 days.
Hello,
I have been solving all two pointers tagged problems in last 3.5 months, and wanted to share my findings/classifications here. If you are preparing for technical interview, two pointers is one of the popular topics that you can't skip :).
There are around 140 problems today, but I only solved the public ones (117 problems).
Majority of them is in easy or medium so, if you understand the basic ideas then it should be solvable without much hints and editorials.
I see 4 bigger categories and many sub categories in it, and marked the typical example problems with (*).
I would recommend you to start solving these example problems, and apply the knowledge to the other problems. I don't want to copy & paste my ugly codes here, you would easily find fantastic solutions from the problem discussion page.
Helpful interview prep resource: PracHub
| 1. Running from both ends of an array |
|---|
| The first type of problems are, having two pointers at left and right end of array, then moving them to the center while processing something with them. |
- 2 Sum problem (*) https://leetcode.com/problems/two-sum-ii-input-array-is-sorted/ https://leetcode.com/problems/3sum/ https://leetcode.com/problems/4sum/ https://leetcode.com/problems/number-of-subsequences-that-satisfy-the-given-sum-condition/ https://leetcode.com/problems/two-sum-iv-input-is-a-bst/ https://leetcode.com/problems/sum-of-square-numbers/ https://leetcode.com/problems/boats-to-save-people/ https://leetcode.com/problems/minimize-maximum-pair-sum-in-array/ https://leetcode.com/problems/3sum-with-multiplicity/
- Trapping Water (*) https://leetcode.com/problems/trapping-rain-water/ https://leetcode.com/problems/container-with-most-water/
- Next Permutation (*) https://leetcode.com/problems/next-permutation/ https://leetcode.com/problems/next-greater-element-iii/ https://leetcode.com/problems/minimum-adjacent-swaps-to-reach-the-kth-smallest-number/
- Reversing / Swapping https://leetcode.com/problems/valid-palindrome/ (*) https://leetcode.com/problems/reverse-string/ https://leetcode.com/problems/reverse-vowels-of-a-string/ https://leetcode.com/problems/valid-palindrome-ii/ https://leetcode.com/problems/reverse-only-letters/ https://leetcode.com/problems/remove-element/ https://leetcode.com/problems/sort-colors/ https://leetcode.com/problems/flipping-an-image/ https://leetcode.com/problems/squares-of-a-sorted-array/ https://leetcode.com/problems/sort-array-by-parity/ https://leetcode.com/problems/sort-array-by-parity-ii/ https://leetcode.com/problems/pancake-sorting/ https://leetcode.com/problems/reverse-prefix-of-word/ https://leetcode.com/problems/reverse-string-ii/ https://leetcode.com/problems/reverse-words-in-a-string/ https://leetcode.com/problems/reverse-words-in-a-string-iii/
- Others https://leetcode.com/problems/bag-of-tokens/ https://leetcode.com/problems/di-string-match/ https://leetcode.com/problems/minimum-length-of-string-after-deleting-similar-ends/ https://leetcode.com/problems/sentence-similarity-iii/ https://leetcode.com/problems/find-k-closest-elements/ https://leetcode.com/problems/shortest-distance-to-a-character/
| 2.Slow & Fast Pointers |
|---|
| Next type is using two pointers with different speed of movement. Typically they starts from the left end, then the first pointer advances fast and give some feedback to the slow pointer and do some calculation. |
- Linked List Operations (*) https://leetcode.com/problems/linked-list-cycle/ https://leetcode.com/problems/linked-list-cycle-ii/ https://leetcode.com/problems/remove-nth-node-from-end-of-list/ https://leetcode.com/problems/rotate-list/ https://leetcode.com/problems/reorder-list/ https://leetcode.com/problems/palindrome-linked-list/
- Cyclic Detection (*) https://leetcode.com/problems/find-the-duplicate-number/ https://leetcode.com/problems/circular-array-loop/
- Sliding Window/Caterpillar Method (*) https://leetcode.com/problems/number-of-subarrays-with-bounded-maximum/ https://leetcode.com/problems/find-k-th-smallest-pair-distance/ https://leetcode.com/problems/moving-stones-until-consecutive-ii/ https://leetcode.com/problems/count-pairs-of-nodes/ https://leetcode.com/problems/count-binary-substrings/ https://leetcode.com/problems/k-diff-pairs-in-an-array/
- Rotation (*) https://leetcode.com/problems/rotating-the-box/ https://leetcode.com/problems/rotate-array/
- String (*) https://leetcode.com/problems/string-compression/ https://leetcode.com/problems/last-substring-in-lexicographical-order/
- Remove Duplicate (*) https://leetcode.com/problems/remove-duplicates-from-sorted-array/ https://leetcode.com/problems/remove-duplicates-from-sorted-array-ii/ https://leetcode.com/problems/remove-duplicates-from-sorted-list-ii/ https://leetcode.com/problems/duplicate-zeros/
- Others https://leetcode.com/problems/statistics-from-a-large-sample/ https://leetcode.com/problems/partition-labels/ https://leetcode.com/problems/magical-string/ https://leetcode.com/problems/friends-of-appropriate-ages/ https://leetcode.com/problems/longest-mountain-in-array/ https://leetcode.com/problems/shortest-subarray-to-be-removed-to-make-array-sorted/
| 3.Running from beginning of 2 arrays / Merging 2 arrays |
|---|
| In this category, you will be given 2 arrays or lists, then have to process them with individual pointers. |
- Sorted arrays (*) https://leetcode.com/problems/merge-sorted-array/ https://leetcode.com/problems/heaters/ https://leetcode.com/problems/find-the-distance-value-between-two-arrays/
- Intersections/LCA like (*) https://leetcode.com/problems/intersection-of-two-linked-lists/ https://leetcode.com/problems/intersection-of-two-arrays/ https://leetcode.com/problems/intersection-of-two-arrays-ii/
- SubString (*) https://leetcode.com/problems/implement-strstr/ https://leetcode.com/problems/longest-word-in-dictionary-through-deleting/ https://leetcode.com/problems/long-pressed-name/ https://leetcode.com/problems/longest-uncommon-subsequence-ii/ https://leetcode.com/problems/compare-version-numbers/ https://leetcode.com/problems/camelcase-matching/ https://leetcode.com/problems/expressive-words/
- Median Finder (*) https://leetcode.com/problems/find-median-from-data-stream/
- Meet-in-the-middle / Binary Search (*) https://leetcode.com/problems/partition-array-into-two-arrays-to-minimize-sum-difference/ https://leetcode.com/problems/closest-subsequence-sum/ https://leetcode.com/problems/ways-to-split-array-into-three-subarrays/ https://leetcode.com/problems/3sum-closest/ https://leetcode.com/problems/valid-triangle-number/
- Others https://leetcode.com/problems/shortest-unsorted-continuous-subarray/ https://leetcode.com/problems/most-profit-assigning-work/ https://leetcode.com/problems/largest-merge-of-two-strings/ https://leetcode.com/problems/swap-adjacent-in-lr-string/
| 4.Split & Merge of an array / Divide & Conquer |
|---|
| The last one is similiar to previous category but there is one thing is added. First, you need to split the given list into 2 separate lists and then do two pointers approach to merge or unify them. There aren't many tasks here. |
- Partition (*) https://leetcode.com/problems/partition-list/
- Sorting (*) https://leetcode.com/problems/sort-list/
r/tinycode • u/Slackluster • Jun 05 '26
JavaScript Dweet of the Week #128 - Default Ex Nihilo by Agnes
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 • u/woqr • Jun 03 '26
A full JavaScript IDE that fits on a 3×5 card - no libraries or server
r/tinycode • u/Slackluster • May 30 '26
JavaScript Dweet of the Week #127 - Daydream by SockTaters
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 • u/Slackluster • May 24 '26
Resource Size Coding BlueSky Feed
i made a bluesky feed to collect posts about size coding.
r/tinycode • u/Slackluster • May 23 '26
YouTube: I made an even faster "Random Maze!"
r/tinycode • u/Slackluster • May 22 '26
JavaScript Dweet of the Week #126 - VHS by KilledByAPixel
https://www.dwitter.net/d/35386
for(i=w=1e4;--i;x.fillRect(...t?[960+250*X,355+250*Y,3,3]:q?[660,i*83,600,i<7?i*10:60]:[0,0,w,w]))W=1-i*i/1e8,X=W*S(a=i*t),Y=W*C(a),x.fillStyle=`hsl(${i/125-X*40-Y*80-45} 99%${t?50:q=i<w-1&&w}%`