Computer Science · Graphics & Games · Digital Art
The Demoscene
A demo is a computer program that isn't a game or a tool. It is a music video that the computer draws live, 60 times a second, from code. The people who make demos, called the demoscene, have competed for 40 years to squeeze impossible-looking graphics out of machines everyone else thought were maxed out. Some of their best work fits in a file smaller than a single photo on your phone.
Where It Began: Hackers Signing Their Work
In the early 1980s, home computers like the Commodore 64 arrived in millions of bedrooms. Games came on disks protected against copying, and groups of teenage "crackers" competed to break that protection first. To take credit, they added a short animated title screen to the copied game with their group's logo, a scrolling message, and music. This was called a cracktro (crack + intro).
Soon the cracktros became more impressive than the cracking. Groups competed over who could make the smoothest scrolling text, the most colors, or effects the machine was "not supposed to" be able to do. By the late 1980s many groups dropped the copying altogether and made stand-alone demos, legal works of art built only to show off. The Commodore Amiga, released in 1985, with its custom graphics and sound chips, became the scene's favorite machine.
Wasn't cracking illegal?
Tiny Programs, Huge Worlds
Demo competitions are split into categories, and the most famous categories have a size limit. A 64k intro must fit, pictures, 3D models, music and all, in 65,536 bytes. A 4k intro gets 4,096 bytes. Some contests allow only 256 bytes, which is shorter than this paragraph.
How can a whole animated film fit in a file that small? The trick is to store no pictures or recordings at all. The program stores the recipe, the math that describes a texture, a shape, or a melody, and cooks it when it runs. That is procedural generation, and the craft of cramming it into the fewest bytes is sizecoding.
The screenshot bar is cut off. Drawn to scale it would be about 95 times longer than the 64k bar.
Where does 1920 × 1080 × 3 come from?
Demo Lab: Effects and Video Treatments
Demos are built from a vocabulary of classic effects, each one a small formula run for every pixel or object on every frame. Pick one below and watch it run live in your browser. The byte counter shows how big the JavaScript for that effect really is. It is read from the running code, not typed in by hand.
Then treat the picture the way video artist Nam June Paik treated a TV, with a magnet, a collapsing beam, a torn poster, or a scrambled signal. Same ideas, but here every one is a few lines of code you can count.
Video treatments (Paik's techniques, stackable)
Keyboard: focus the screen, use arrow keys to move the magnet; hold Shift to tear.
Why are demos so full of sine waves?
sin() gives motion that loops with no jumps. Adding a few sine waves of different sizes and speeds gives patterns that look organic and never quite repeat. The plasma, the scroller's bounce, and the tunnel's twist are all sine waves added together. Old machines were too slow to calculate sin(), so coders precomputed a small table of values once and looked them up every frame.Why does the byte counter grow when I switch treatments on?
What are "greetings"?
From Paik's TV to the Pixel Shader
Twenty years before the first cracktro, Nam June Paik was already treating pictures as material to be bent. He worked with electrons and magnets. Demo coders work with numbers. Look closely and they are doing the same four things.
The difference is what a mistake costs. Paik could not undo a magnet. A coder changes one number and sees a new picture 60 times a second, so both can play like a musician with an instrument.
Discussion: which is more of an instrument?
Demoparties and Living Heritage
Demos are premiered at a demoparty. Hundreds or even thousands of sceners bring their computers into one hall for a weekend, finish their work on site (often with no sleep), and show it on a giant screen. The audience votes, and winning a big competition earns a lot of respect. The largest parties include Assembly in Helsinki, Finland (since 1992) and Revision in Saarbrücken, Germany, held every Easter.
In 2020 Finland became the first country to add the demoscene to its national list of intangible cultural heritage, the same kind of list that protects folk dances and traditional crafts. Germany, Poland, the Netherlands, and other countries followed. The scene is now officially recognized as a living art tradition.
Its influence is everywhere. Many sceners went on to work at game studios and graphics companies. Real-time effects in games, music visualizers, live concert visuals, and shader art sites all trace back to techniques the demoscene pioneered.
Discussion: why build under a limit?
Make Your Own Production
Sceners do not stop at experiments. They finish a piece, give it a name, release it with credits, show it to an audience, and keep it alive afterwards. You can follow the same path, starting from the Creative Coding + Demoscene starter pack ("Signal Garden"), which already runs three real-time scenes in the browser.
1. Choose one limit
Pick a single constraint and write it at the top of your README.md: one scene only, two colours plus black, exactly 60 seconds, or the whole folder under 16 KB. The limit is what makes the piece yours instead of a copy of the starter.
2. Compose, don't stack effects
Choose one focal point, one palette (the color theory lab helps), and one kind of motion: waves from the Fourier series lesson or flow from Perlin noise. Give it a beginning, a build, and an ending. A demo is a short film, so time matters as much as pixels.
3. Make it repeatable
Record the seed and every slider value so the piece looks the same every time it runs. If something changes with each refresh, decide whether that is the art or a bug.
4. Release it properly
Every demo ships with a plain text NFO file. Add info.txt to your folder with the title, your name or group name, the limit you chose, the controls, the tools, credits for anything you did not make, and "greetings" to classmates who helped. Then publish the folder with GitHub Pages so it has a real address, and export one PNG still to use as its thumbnail.
5. Hold a class compo
Show each production full-screen, one after another, with the lights down. Before the first one plays, agree on three voting categories, such as composition, use of the limit, and "how did they do that?". Each person scores every entry but their own.
6. Keep it living
Real groups often release a "party version" at the event and a "final version" weeks later with the bugs fixed. Use the compo feedback to make one change, bump the version number in info.txt, and republish. A production with a history of versions is a project. A file you never opened again is an exercise.
Release checklist
- It runs full-screen from a fresh browser tab with no errors in the console.
- The limit is stated, and the piece respects it.
info.txtlists title, author, limit, controls, credits, and version.- It has a public address and a thumbnail image.
- You made at least one change because of audience feedback.
Practice Problems
Check what you know about the scene's history, tiny programs, and the math behind classic effects.
Easy1. What is a demo?
Easy2. The demoscene grew out of short animated screens that crackers added to copied games. What were they called?
Medium3. A 64k intro may be 65,536 bytes. A 4k intro may be 4,096 bytes. How many 4k intros fit in the size of one 64k intro?
Medium4. How can a 64k intro show detailed textures and play a full soundtrack?
Medium5. A demo runs at 60 frames per second. How many frames does it draw during a 3-minute demo?
Medium6. Which function gives demo effects smooth motion that loops forever with no jumps?
Challenge7. A 320 × 200 screen (a classic PC demo resolution) uses 1 byte per pixel. How many bytes is one full frame?
Challenge8. In 2020, Finland added the demoscene to its national list of what?
Medium9. In the Demo Lab, the Magnet TV treatment copies each pixel from a position rotated around the magnet. What is that idea called in graphics?
Challenge10. Décollage in the lab uses a mask with one value per pixel. For the 320 × 200 screen, how many mask values are there?