The 64k intro is one of the most challenging forms of the standard computer demo. Essentially, the coder must fit all of his music, graphics and compiled code into 65536 bytes. Now, 64kBytes is not much. It's about the size of an average JPEG image. Heck, you could fit twenty-two 64k intros on a standard floppy disk, so you might assume that 64k intros would be pretty lame. Not a chance. A well coded intro can have texture-mapped 3D animation with light and shadows, music, and all the other effects of its cousin, the demo.

How can you fit all that into 64k? Here are some common tricks of demo coders:

  • Use assembler or C, and Pascal if you're lazy. When compiling, make sure unnecessary headers are not included. Write your own smaller versions of library functions, if necessary.

  • Music: use modules (like MOD or S3M) because there is no way you'll fit an MP3 into this baby. You won't be able to fit any samples, so write code that will generate the samples into memory at run-time. In the old days you would write support for only one soundcard, (usually the Gravis Ultrasound). Nowadays, support only one interface, like DirectSound or OSS.

  • You can't fit many bitmaps, so program routines that generate bitmaps to memory at run-time. Usually you'll be generating texture maps for your 3D objects. Oh, you won't be able to fit many objects in, so use fractal or other routines to generate them at run-time.

  • Compress the whole thing with an algorithm like gzip and put the decompresser at the beginning of the executable.

The term intro is a historical term from the early days of demo-making. The first demos of any kind were intros - tiny graphically-intensive programs placed on pirated game disks by the cracker to show off. These disks were pretty full to begin with, so the coders had to fit these advertisments in what little space was left, usually les than 64kb. Eventually, these intros became respected enough to exist outside of the game pirating scene.

If you really want to see how well these things are programmed, download some. Try Stash by The Black Lotus and prepare to be amazed. (

And for the real anorexic coding challenge, check out the 4k intro.

Log in or register to write something here or to contact authors.