Sizecoding

About

Art of creating very small computer programs which are usually 512 bytes or less in size. The size of these tiny programs is measured by their total size in opcode bytes and are usually presented as an executable binary.

Those programs usually come with many technical tricks regarding instructions choice and are mostly written in assembly language for a specifically chosen target platform.

My approach is algorithmically focused with preference for small understandable cross-platform code.

Most sizecoding programs below are programmed with C language and run under Linux with a 32 bits framebuffer setup (fbdev), small amount of assembly is only used for platform dependent setup such as Linux ELF header and framebuffer setup to obtain a minimal drawing framework.

Some programs run on the TIC-80 fantasy computer / virtual machine, those programs (written in JS or LUA) can be ported easily and may be generally smaller on other systems, a 128 bytes TIC-80 program may be 64 bytes on x86 platform when they use few library functions.

Note: The size include OS metadata and platform dependent code to write to the display, most programs below are in fact much smaller (about 70 bytes smaller) if all the OS metadata is ignored.

512 bytes

Twigs - 512 bytes Linux framebuffer intro

Twigs

Iterated Function System fractals composited together with symmetry. My first sizecoding program which demonstrated that my engraving-like IFS fractals can be reduced down to a small program. It was released at inérciaDemoparty 2020.

Use floats but does not draw with saturated arithmetics thus the image accumulate noise. It also use LZMA compression.

links: youtube github pouet code (no OS metadata) image

256 bytes

TrueSpace - 256 bytes Linux framebuffer intro

TrueSpace

Integer circle algorithm. My first 256 bytes intro which just show some background stars and vertical bars. Did not have time to do more. It was released at Lovebyte 2021.

It only use integers and simple arithmetic operations but does not draw with saturated arithmetics thus the image accumulate noise.

links: youtube github pouet

Flagship - 256 bytes Linux framebuffer intro

Flagship

Integer circle algorithm with symmetry and saturated arithmetic. Improved version. This show some kind of Mandelbrot like fractal shadow at the center. It was released at Revision demoparty 2021.

It only use integers and simple arithmetic operations (add, sub, AND, shift), SIMD instructions for saturated arithmetic.

links: youtube github pouet

Campers - 256 bytes Linux framebuffer intro

Campers

Integer circle algorithm with symmetry and saturated arithmetic. A variation of Flagship. The symmetry create some kind of face (animal ?) at the center. It was released at Outline Online demoparty 2021.

It only use integers and simple arithmetic operations (add, sub, AND, shift), SIMD instructions for saturated arithmetic.

links: youtube pouet

Calculating Space - 256 bytes Linux framebuffer intro

Calculating Space

Integer circle algorithm and saturated arithmetic. The many improvements from previous intros allowed more colors variation. It show abstract lines with blurry background. It was released at Outline Online demoparty 2021.

It only use integers and simple arithmetic operations (add, sub, AND, shift), SIMD instructions for saturated arithmetic.

links: youtube pouet

Apollonian - 256 bytes Linux framebuffer intro

Apollonian

Integer circle algorithm. The many improvements in size from the previous intros allowed more colors variation. It show some kind of Apollonian gasket fractal patterns. It was released at Shadow demoparty 2021.

It only use integers and simple arithmetic operations (add, sub, AND, shift), SIMD instructions for saturated arithmetic.

links: youtube pouet

Chmmr - 256 bytes TIC-80 intro

Chmmr (TIC-80)

Result of playing with harmonic oscillators which produce some kind of autonomous pixels art with euler spiral patterns. It was released at Flash party 2021.

Has simple sound. The code is JavaScript (which use special functions provided by the TIC-80 such as 'poke' and 'cls').

links: youtube online pouet

128 bytes

QuasiSpace - 128 bytes Linux framebuffer intro

QuasiSpace

Integer circle algorithm. The many improvements in size from the previous intros allowed me to reach 128 bytes. It show some kind of cheese / craters fractal patterns. It was released at Outline Online demoparty 2021.

Integers and simple arithmetic operations but does not draw with saturated arithmetics thus the image accumulate noise.

links: youtube pouet

HyperSpace - 128 bytes TIC-80 intro

HyperSpace (TIC-80)

Integer Circle algorithm. One of the idea was to do sounds with structure and variations. I believe it is simple enough to reach 64 byte without sounds on other platforms like DOS. It was released at Lovebyte Battlegrounds 2021.

The code is LUA and is 157 characters, final binary is 128b and was packed with pactic.

links: youtube online pouet

Links


back

24/08/2021