Size Coding
The art of compression
Size coding emerged from demo scene competitions with strict byte limits, pushing programmers to achieve impossible effects in 64KB, 4KB, or even 256 bytes.
Overview
How much can you fit in 64 kilobytes? What about 4 kilobytes? 256 bytes? The demo scene answered these questions with productions that seemed to defy physics. Size coding—creating complex audiovisual productions under strict byte limits—became an art form. The techniques developed fed into game compression, procedural generation, and efficient programming practices.
Fast facts
- Origin: Demo scene size competitions (late 1980s).
- Categories: 64K, 4K, 1K, 256 bytes, smaller.
- Techniques: Procedural generation, compression.
- Influence: Game engines, web development, embedded systems.
Size categories
| Category | Limit | Challenge |
|---|---|---|
| Demo | Unlimited | Full artistic expression |
| 64K intro | 65,536 bytes | Procedural textures, music |
| 4K intro | 4,096 bytes | Extreme compression |
| 1K intro | 1,024 bytes | Minimalist effects |
| 256 byte | 256 bytes | Pure code golf |
Legendary productions
| Production | Size | Achievement |
|---|---|---|
| .kkrieger | 96KB | Complete FPS game |
| Elevated | 4KB | Mountain landscape flythrough |
| fr-08 | 64KB | Full 3D engine, procedural everything |
| Memories | 256 bytes | C64 demo, multiple effects |
Techniques
| Technique | Purpose |
|---|---|
| Procedural generation | Create content algorithmically |
| Executable compression | Pack code tightly |
| Mathematical textures | Formulas instead of bitmaps |
| Synthesis | Generate audio mathematically |
Modern applications
Size-coding discipline appears in:
- Web performance optimisation
- Embedded systems
- Game asset compression
- Demakes and fan projects