[Ships in a bottle........]
A brief history ok 4ks

4 kilobyte intros are like bonsai


"This post is bigger than 4Kbyte".

4k, in the qabbalah of demoscene, means a program with size smaller or equal to 4096 bytes.

Classic figures you get to explain how tight 4k is are, for example, comparisons with other programs (Microsoft Word spans several megabytes) or with the size of a movie (a 3 minute .avi can weight even 15 megabytes).
But those delights in 4096 bytes are more than that. You should imagine 4ks as the haiku of informatics; like an ecosystem in a matchbox; like a ship in a bottle. Like bonsai.

If this article was made of code, we would have already used 25% of the available 4096 bytes.

This is a trip through what the demoscene managed to put in 4 kilobyte intros across the last 10 years.

Ready?

1997 - Omniscent - (download link - watch with Dosbox)

Floating into the corridors of "Omniscent"
To understand the beauty of "Omniscent" you don't have necessarily to know Descent, as you should have not necessarily seen Microsoft Word to understand how small 4096 bytes are.

"Omniscent" was a step towards the future. "Omniscent" brings an entire level of the game "Descent" in 4Kbytes, and, as a bonus, if you rise your speakers' volume, you'll hear the metallic chords of a videogame-music.

Sure, the technology is ten years old, but in those 4 kilobytes you'll find everything: earth, lava, warning signs, neons and even alien-painted walls. We see everything in first person, floating lightly as a spaceship pushed by anti-gravitational rockets.

And while we exit from the tunnel, maybe we can hear behind of us the sound of the exploding corridors.

1998 - Mesha - (download link - watch with Dosbox)

Mesha's stylish textures
After "Omniscent", democoders wanted to demonstrate that more and more things could fit into 4k; they wanted to push the limit some polygons further.

So the intro's info-file tells us that those 4096 bytes of code processed 13.000 vertexes, 17.000 faces, 8 different textures; many 3d solids were created by "revolutionary" generative algorithms.

If there is an astonishing aspect of 4k intros, this is the size of each routine, like the size of a leaf or a root in a bonsai tree.
So "Mesha" contains a code depacker in only 95 bytes. Every texture is generated by an algorithm of a few bytes. Other 4ks have musical players in 100, 110 bytes or musical scores in a bunch of bits.

Now you could ask yourself: would nowadays' software span entire DVDs if it was made as 4k are?

1999 - Void3 - (download link - watch with Dosbox or see the video)

Yes, the future is now
The echo of a metallic sound in the distance, a pink fog that clears in front of our eyes, and then, coup de coeur : speech synthesis in 4k.
The future is now.

Ok, even Commodore 64 could do speech synthesis, you may argue, decades before, but here is the difference: this is 4k. C64 had ten times that memory space, and, do you remember?, when that "destroy him, my robots" quote got out of the speakers, everything just freezed.

Here we have realtime 3d graphics, synth quality music, 16 millions of colors and high resolution video all running together with speech synthesis. That's just the difference.

2000 - Stoerfall ost - (download link - watch the video)

Robots in a 4k factory
Who programmed a factory with orange automatic robotic arms and put it to sleep in just one sector of our hard drive?

4k intros are no more than a magic lamp: you just have to rub them to realize your dreams.

If we run "Stoerfall ost", we suddenly see two couples of orange robots hanging up some blue panels in an assembly line. Then the camera zooms out and we understand they are just weaving Penelope's shroud. They are condemned by the coder to repeat the same moves ad infinitum.


Perpetual motion in only 4096 bytes. Now, GOTO 10.

2001 - Juggler 2001 - (download link - watch with Dosbox)

The surreal world of the juggler
A reference to the koine of computer-graphics, again.

This time, we should go back to November of 1986 to catch it, year when in an Amiga program the animation of a stylized humanoid made three reflecting balls spinning inside a surreal landscape. At that time, this made people scream for a miracle, and relegated green phosphors monitors of IBM PCs in a dusty corner, in favour of a machine that was light years ahead in technology.
The programmer himself described in detail the somersaults needed to inflate that animation in an Amiga diskette.

An Amiga disk is 880Kb big.

In 2001, the juggler comes back to life; this time the camera is not static, but moves through the scene; the spheres are not just three anymore, but become many; music is not even that metallic "bip" again, but is made of real armonic chords.

Pressing "escape", the Pandora's box closes inside itself its 4096 bytes.

2002 - Industrial light and magic - (download link - works in xp and vista)

Shadows and reflections on a sphere
Industrial light and magic is obviously the company that creates the most astounding special fx in the world, but here its name is borrowed by the two democoders of this intro to play on words with the "light" of the technique used to realize the graphics (raytracing) and the "magic" of enclosing everything in 4 kilobytes.

This time, all the cliches of raytracing (here, scene's peculiarity, in realtime) are respected: the reflecting checkerboard that mirrors the spheres made of different materials, the columns with the central light source, the tunnel with shadows. Everything is perfect, even the realtime generated soundtrack.

Raytracing is a computational technique that normally uses machine-hours to create just a simple image, but this time, with this masterpiece, space and even time limits are broken.

2003 - Mojo dreams - (download link - works in windows xp)

Digital sun over the hills
The tentative to recreate a landscape (maybe a martian one) in few bytes is common in the demoscene, with more or less good results.

Indeed, here we witness a leap forward: normally we would find mojo dream's graphics in several megabytes weighted ATI or Nvidia's tech demos. Instead, for the nth miracle of demoscene, here everything is concentrated in 4k.

But how is this step made, compared to "Mars"? With algorithms, first of all: the terrain is not generated with a "simple" perlin noise, anymore, but owes its natural look to "Doc Mojo"'s (from here the title) Musgrave researchs. Light is bend by the light scattering routines. The rest are demoscenical tricks, but looking at the mojo dream's mountains is like looking at the Matrix behind an operator's monitor: at the end, they're made of scrolling green characters.

2004 - Micropolis - (download link - works in windows xp)

Stepping in a 4k world
If "Stoerfall ost" recreated an entire factory in 4k, Micropolis creates a whole futuristic city.

There are bridges, buildings, trains, and the sky is obfuscated by thousands of small stylized flying cars.
Music is obviously synthetic and sequenced. Frequencies are cut progressively by resonant filters, the ones you normally find in 10 thousand dollars recording studios' synths.

Suddenly, going backwards, the camera uncovers a mech's foot. It's the topic moment. Suspension of disbelief falls down, because in a fraction of second the mech starts to march and goes with its footsteps towards the heart of the 4 kilobytes city.

But if you thought that we reached the limit (what can you fit in 4k bigger than a city?), read ahead.

2005 - Parsec - (download link - watch the video)

Two twin moons and a ray of light
Bigger than a city.
It's simple: a planet.
More planets.
A galaxy.

This is "Parsec": an entire galaxy in 4k.

We get an initial image of the whole galaxy, but then we see that it's composed of smaller planets. Probably some planets are populated. We get worlds with asteroid rings, we get nebulas, we get stars and space debris. Quality is not far from cinematographic effects.

The 4k intros with "natural" scenarios close a circle: men always knew that behind every natural shape there is mathematics; now mathematical algorithms are used to recreate natural worlds.

2006 - Polarfield - (download link - works in windows xp)

Electronic parrots
The reaction to "Parsec"'s delusion of grandeur could not be different from minimalism.

At the beginning of "Polarfield", the screen gets filled of garbage; a "loading" sign is in the lower right corner (actually the "garbage" is not really garbage, but a side effect of precalculus). In the background, a synthetic music repeats the same six notes, in a loop. We may think that something's really broken in the program, but at this point, the intro starts.

Polarfield uses only two colors, black and white, and the intermediate shades of gray, but turns that into unequaled elegance.

The abstract shapes (from white cubes, to romboids with black spikes, similar to the beak of a robotic parrot) are rendered with an algorithm called ambient occlusion (we find something really similar in 3d graphics professional programs, like 3dStudio or Maya). At the end, the music fades away while the 3d solids continue to dance in a milky background, and the electronic carrillon closes and stops moving.

2007 - Stiletto - (download link - watch the video)

Nice legs!
What's left after robots, planets, Descent-levels and landscapes in a 4k intro? Well, just an human. A woman, or, to be exact, half a woman.

When the intro starts, we hear just footsteps; then the silhouette of two legs, unequivocally feminine, comes onto the screen, wearing a pair of red stilettos that, we are informed, cost only 99 dollars. The intro then gets a bit repetitive; the lower part of the body is taken by many different angles.

But what gives the wow-factor is the flexuous movement, the natural colour of the skin, that makes us believe the rest of the body is not less angelical. Indeed, knowing the space-hungry scene democoders, the upper polygons of the body are surely just cut in an abrupt section.

Digital walls within 4k worlds probably are just the wings of a theatre.

posted by friol at 8/22/2007 06:51:00 PM - under: , , - comments? here (1)

the Tunnel - demoscene blog(c) friol 2o18