Computer Science · Graphics & Games · Digital Art

The Demoscene

Real-Time Graphics Sizecoding Procedural Art Demoparties

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.

A well-used Commodore 64 home computer covered in stickers from demo groups, sitting on a table next to other retro hardware
1982 · Commodore 64: A scener's real C64, covered in group stickers. It ran at 1 MHz with 64 KB of memory, less than one photo on your phone, and demo coders still find new tricks for it today. Photo: JIP. CC BY-SA 3.0
A beige Commodore Amiga 500 computer with its keyboard, external floppy drive, mouse, and a monitor showing a desktop clock
1987 · Amiga 500: The Amiga's custom chips could move graphics and play four-channel sampled music on their own, which made it the demoscene's home in the late 1980s and early '90s. Photo: Bill Bertram. CC BY-SA 2.5
Blocky, colorful Commodore 64 pixel art: a chrome-style group logo on the left and a swirling rainbow pattern filling the rest of the screen
Commodore 64 demo: A screen from a Finnish C64 demo. Notice the big group logo, which is a leftover habit from cracktros, and the chunky pixels. The C64 had only 16 colors to work with. Public domain.
Wasn't cracking illegal?
Yes. Copying and spreading games without paying is piracy, and it still is. That is part of why the scene split: people who loved the art left the copying behind and made original demos, which break no laws. Today's demoscene is a legal art and programming community, and many of its members went on to build the game and graphics industry.

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.

A glowing spiral galaxy with a bright white core, wisps of blue gas, and dark planets in the foreground, rendered in real time
2004 · "Beyond" by Conspiracy: Everything in this 64k intro, the galaxy, the gas clouds, the planets and the soundtrack, is generated by math as it plays. A single uncompressed screenshot of it is bigger than the whole program. Screenshot: Gargaj. CC BY-SA 2.5
256-byte intro256 B
4k intro4,096 B
64k intro65,536 B
One 1080p screenshot (uncompressed)6,220,800 B

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?
A 1080p image has 1,920 × 1,080 = 2,073,600 pixels. Each pixel stores red, green, and blue, one byte each, so the image needs 2,073,600 × 3 = 6,220,800 bytes. Divide by 65,536 and you get about 95. That is why a 64k intro cannot contain even one stored full-screen picture. It has to compute its images.

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)

Magnet TV settings

Each pixel is copied from a spot rotated around the magnet. Drag on the screen to move it.

Zen for TV settings

Every row is squeezed toward the middle column. At 0% the whole picture is one glowing line.

Décollage settings
Signal scramble settings

Tears rows sideways, rolls the picture, splits red from blue, adds static.

Keyboard: focus the screen, use arrow keys to move the magnet; hold Shift to tear.

Why are demos so full of sine waves?
A sine wave rises and falls smoothly forever, so feeding the time into 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?
Each treatment is a real function, and the counter adds up the source length of every one that is running. Notice which are cheap and which are costly. A 4k intro might afford one or two, so a scener has to decide which effect earns its bytes.
What are "greetings"?
Almost every demo includes a scrolling list of other groups' names, a shout-out to friends and rivals. It is a leftover from cracktros and one of the scene's oldest traditions. Try typing your own greetings into the scroller.

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.

Paik on a TVWhat it doesIn code
Magnet TV (1965)A magnet bends the electron beam, so lines swirl near it.A displacement map: copy each pixel from a rotated position. Demo coders call it a domain warp.
Zen for TV (1963)The sideways sweep is cut, so the picture collapses to a line.Scale x toward the center column and average each row's color.
DécollageTear the top poster to show the layers under it.A mask that chooses between two layers per pixel, the basis of every compositor.
Signal scrambleA damaged set tears rows, rolls, and splits its colors.The glitch: shift rows, offset color channels, add noise. Cracktros faked it on purpose.

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?
Try the same treatment in the lab, then think about Paik's real magnet. What can the real one do that the code cannot? What can the code do that the magnet cannot? Is an artwork more alive when it can fail in ways you did not plan?

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.

View from high in an arena: the floor is packed with long rows of tables, glowing monitors, and people, with a large stage screen at the far end
2008 · Assembly, Helsinki: An ice-hockey arena turned into a computer hall. Each glowing dot is someone's screen, and the big stage shows the competition entries. Photo: Maria Morri. CC BY-SA 2.0
A dark hall with a large projection screen and green stage lights; two presenters stand on stage while the audience sits at tables with laptops and retro computers
2025 · Revision, Saarbrücken: The opening ceremony at Revision, one of the world's biggest demoparties. Old and new machines share the tables. Photo: OpenCatMap. CC BY 4.0

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?
No one needs a 4 KB program today, since computers have billions of bytes. So why do sceners still compete with tiny size limits? Think about sonnets (always 14 lines), haiku, or a sport's rules. How can a limit make people more creative instead of less?

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.txt lists 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?

Hint: It's computed while you watch, not played back from a recording.

Easy2. The demoscene grew out of short animated screens that crackers added to copied games. What were they called?

Hint: It's a blend of two words: crack + intro.

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?

Hint: 65,536 ÷ 4,096.

Medium4. How can a 64k intro show detailed textures and play a full soundtrack?

Hint: This is called procedural generation.

Medium5. A demo runs at 60 frames per second. How many frames does it draw during a 3-minute demo?

Hint: 3 minutes = 180 seconds. Multiply by 60.

Medium6. Which function gives demo effects smooth motion that loops forever with no jumps?

Hint: The plasma, the scroller bounce, and the tunnel twist all use waves.

Challenge7. A 320 × 200 screen (a classic PC demo resolution) uses 1 byte per pixel. How many bytes is one full frame?

Hint: 320 × 200 × 1. Compare it to 65,536. One stored frame nearly fills a whole 64k intro!

Challenge8. In 2020, Finland added the demoscene to its national list of what?

Hint: The same kind of list protects folk dances and traditional crafts.

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?

Hint: The output pixel is looked up from somewhere else in the source picture.

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?

Hint: One per pixel, so 320 × 200.