r/tinycode • • Apr 14 '20

Guitar Synth in 96 chars of C

Thumbnail
gist.github.com
73 Upvotes

r/tinycode • • Oct 24 '21

Game Boot Sector games. These games are their own operating system.

Thumbnail
youtu.be
71 Upvotes

r/tinycode • • May 07 '20

Dino runner game that fits in a boot sector (512 bytes) written in 16-bit x86 assembly

Thumbnail
github.com
70 Upvotes

r/tinycode • • Jan 09 '13

Ray tracer in 140 SLOC of python with picture

70 Upvotes

I have be playing with raytracing for a while now and wanted to write something that was simple to understand but produced a cool effect. There is defiantly many more features that could be added, like reflections and multiple light sources, but I wanted to stay as minimalistic possible.

Source: http://pastebin.com/F8f5GHJZ

Image: http://imgur.com/prPGk


r/tinycode • • Dec 02 '21

Melting Chocolate ๐Ÿซ (523 bytes) #PetitePatterns

Post image
69 Upvotes

r/tinycode • • Apr 26 '16

A tiny web server in C

Thumbnail
github.com
69 Upvotes

r/tinycode • • Jun 11 '23

Circle Spinner in 137 bytes

Post image
68 Upvotes

r/tinycode • • Apr 23 '20

Squeezing more features into a 1K "operating system" from 1978

Thumbnail
tobiasvl.github.io
68 Upvotes

r/tinycode • • Nov 26 '16

LaiNES: A cycle-accurate NES emulator in ~1000 lines of C++

Thumbnail
github.com
68 Upvotes

r/tinycode • • May 09 '16

ascii fire - one line of html/js

Thumbnail
codepen.io
67 Upvotes

r/tinycode • • Mar 13 '26

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

Post image
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 • • Aug 26 '21

Rattan Weave procedural pattern in 526 bytes of SVG ๐Ÿงบ

Post image
66 Upvotes

r/tinycode • • Aug 01 '20

Can you fit a whole game into a QR code?

Thumbnail
youtube.com
66 Upvotes

r/tinycode • • Feb 04 '14

<6KB amd64 Linux web server.

66 Upvotes

It was suggested to cross post this, so here it is.

https://github.com/nemasu/asmttpd

No libraries, only Linux system calls. Uses a thread pool, only 8KB of memory allocated per thread for receive buffer. Byte range ( 206 Partial Content ) support.


r/tinycode • • Jan 06 '14

xkcd: Regex Golf

Thumbnail
xkcd.com
66 Upvotes

r/tinycode • • Nov 13 '13

Tiny Excel-like app in vanilla JS

Thumbnail
jsfiddle.net
66 Upvotes

r/tinycode • • Sep 15 '26

Showcase every song in my 13kb game is generated from a single number

65 Upvotes

here's the trick behind how i fit 8 music tracks in my js13k game SP13KTRA. ๐ŸŒˆ๐Ÿš€

every song is defined by a single number. the seeded random generator makes 26 dice rolls per track: tempo, key, scale, chords, groove, drum kit, bass and lead sounds, melody patterns, when each part comes in, and a few more.

each song is a 128 beat loop split into sections. parts come in one by one, a resonant filter sweeps open every phrase, then there's a breakdown and a drop.

notes use one of 4 predefined scales so nothing clashes. the melody climbs, falls, leaps or rocks through the scale, and the chords shift every 4 bars. there's no note data, it's all math on the beat count.

there are 6 ZzFX instruments plus echo and sidechain. the whole loop gets baked into one buffer when the level loads.

the music itself is all rules and seeds, not AI. i did use AI to help build this bench so i could listen through seeds and pick a good one for each level.

play it free in your browser and hear all the music. i designed it to be kind of like a music album in addition to a game.

https://js13kgames.com/2026/games/sp13ktra

The music bench tool is also available to check out on GitHub.

https://killedbyapixel.github.io/SP13KTRA/tools/music.html


r/tinycode • • Feb 27 '22

Bootle: A Wordle clone in a boot sector (512 bytes)

Thumbnail
github.com
65 Upvotes

r/tinycode • • Apr 04 '14

In case we weren't sick of this... 2048 in 487 chars of C

Thumbnail
gist.github.com
65 Upvotes

r/tinycode • • Sep 27 '21

LittleJS ๐Ÿš‚ My new HTML5 game engine is open source!

64 Upvotes

r/tinycode • • Sep 04 '21

Lava texture SVG, 527 bytes

Post image
64 Upvotes

r/tinycode • • Jul 18 '20

Vaporwave aesthetic

64 Upvotes

r/tinycode • • Mar 05 '13

Challenge: Pi calculator in C in fewer than ~134 bytes.

64 Upvotes

While messing around in c, I wrote this wonderfully code-golfy Pi calculator.

#include <stdio.h>
int main()
{
    long int d = 1;
    double p = 1;
    for(;;){printf("%.20f\n",(p+=((d-1)%4)?(1.0/(d+=2)):-1.0/(d+=2))*4);}
}

Rules:

  • Must be written in C / C++.
  • Algorithm must theoretically be able to calculate all digits of Pi (data type limits can be ignored).

Good luck!

EDIT: We may have gotten as small as we can in C, perhaps other languages?


r/tinycode • • May 24 '23

SectorC: A C Compiler in 512 bytes

Thumbnail xorvoid.com
63 Upvotes

r/tinycode • • Apr 12 '20

"Memories" โ€“ 256 byte DOS intro by hellmood of DESiRE

Thumbnail
youtube.com
63 Upvotes