Demo (computer programming): Difference between revisions

Content deleted Content added
m Size restrictions: boot block -> boot sector
huge expansion
Line 63:
It is also quite common to classify demos by style and content rather than technology. '''Storydemos''', for example, are based on a story line, while '''ravedemos''' share the musical and visual esthetics of rave parties. The most experimental, unusual and controversial demos are often referred to as '''art demos''' or '''abstract demos'''. Many groups have a distinctive style of their own, and sometimes a demo can be described by referring to a well-known group cultivating a similar style, e.g. ''[[mfx]] style'' or ''[[Melon Dezign|Melon]] style''.
 
==SeeDemo alsoelements==
 
*[[Amiga demos]]
Demos consist of program ''code'', ''graphics'' and ''music'', which are traditionally considered the three main elements of a demo and associated with the ''coder'', ''graphician'' and ''musician'', respectively. The overall design is also considered very important, although most groups lack specialized designers.
*[[Demoscene]]
 
*[[List of demos by year]]
===Program code===
 
Demos are executable programs, and the program code created by the coder is still considered a very important element of a demo. Although there are programs known as ''demomakers'' or ''demotools'' that allow the creation of technically decent demos without coder involvement, demogroups not using any code of their own are still widely frowned upon.
 
====Programming languages====
 
Earliest demos were typically made in [[machine code monitor]]s, the same programs that were used by the crackers to crack copy protections. The next step was the transition from monitors to [[assembler]]s.
 
Higher-level programming languages, such as C and C++, started to gradually take over assembly programming in the demos of the 1990's, when cycle-level timing was no longer considered as important as before and compilers were beginning to be able to produce code comparable to hand-coded assembly. The transition to higher-level languages originated in the PC scene.
 
Nowadays, demos programmed in pure assembly are rare on the PC (except for the extreme size-restricted categories), but assembly is still widely considered the only relevant choice for democoding on eight-bit platforms such as the Commodore 64.
 
====Visual effects====
 
Snippets of program code performing visual tricks, collectively called ''effects'', have always been an integral part of demos. Effects are often used to show off the programmer's skills, although they're seldom used as stand-alone content elements any more.
 
"Oldskool effects" are typically based on clever tricks on the video hardware of the classic home computers. Examples:
* [[Rasterbar Demo Effect|Raster bars]], also called copper bars on the Amiga.
* [[Scrolling|Scrollers]] of various kinds.
* Starfields, such as parallax-scrolling and perspective starfields.
* Smooth horizontal waving of graphics images in a per-scanline basis
* [[Shadebobs]]
* [[Infinite bobs]]
* [[Plasma effect]]
* [[Interference circles]]
* Text zoomers
* 3D rendering with dots, wireframe vectors or flat-filled polygons. Cubes and spheres are typical stock objects.
 
"Chunky-pixel effects" use CPU-intensive software rendering to fill pixel-based framebuffers. Software effects have been common in the DOS-era PC demos and Amiga AGA demos, but many of them have also been succesfully implemented on various eight-bit platforms. Examples:
* Effects based on static screen-to-texture lookup tables
** [[Texture mapping|Texture-mapped]] tunnels and other objects rotating around their axis of symmetry
** Wobblers, rotators and other similar effects for 2D images
* Texture-mapped tunnel with freely moving camera, typically based on realtime raycasting
* [[Rotozoomer]]
* [[Mandelbrot set|Mandelbrot zoomer]]
* [[Fire effect]] and other effects based on 2D filters and feedback
* Heightfield landscape (often called "[[voxel]] landscape")
* 2D [[bump mapping]]
* [[Metaballs]]
* Polygonal 3D engines featuring capabilities such as lighting, [[gouraud shading|Gouraud]] and [[Phong shading]], texture mapping, environment mapping and bump mapping. In the mid-1990's, shading was often demonstrated with stock objects such as [[torus]]es.
* 3D scenes rendered in real-time [[ray tracing]]
 
The role of stand-alone technical effects has diminished in modern high-end platforms due to the quickly-growing capabilities of hardware-assisted 3D rendering.
 
====Compression====
 
[[Executable compression]] has been used in demos since the very beginning: pirated software needed to be packed into a compact and easily spreadable format, which often required some kind of compression for both the software itself and the attached intro. Early demos often had multiple parts which were separately decompressed into memory during the short pauses between parts.
 
The demos and intros for modern platforms are compressed either by general-purpose executable compressors (such as [[UPX]]) or programs specifically designed for the compression of small intros. The decompressor stubs integrated in 4K intros are often well under 200 bytes in size. Some Windows-based 4K intros may even wrap themselves inside DOS-based .COM executables in order to eliminate the header bytes. Decompression facilities provided by the operating system may also be used.
 
====Procedural generation====
 
Many size-restricted intros use procedural techniques to [[procedural generation|generate content]] such as textures, 3D objects and music. Some of the ideas were pioneered by [[The Black Lotus]] in their PC intros such as ''Jizz'' and ''Stash''. Nowadays, the achievements of the [[Farbrausch]] group are well-known.
 
Procedural generation is often disguised as compression in order to increase the amusement value. See, for example, the end scrollers of ''The Product'' by [[Farbrausch]] and ''Zoom3'' by ''AND''.
 
====Video modes====
 
Demos written for older platforms often use hand-tailored video modes rather than standard ones. Some examples:
* FLI (Flexible Line Interpretation) makes more colorful pictures possible on the C-64 by diminishing the size of the "character chunk". IFLI (Interlaced FLI) swaps between two FLI pictures between screen refreshes, enhancing both resolution and color palette.
* The display areas in most home computers were surrounded by borders, which could often be removed with special undocumented tricks. The removal of borders made it possible to implement full-screen graphics images and demo effects.
* [[Mode X]] was commonly used in VGA-based MS-DOS demos, allowing resolutions up to 360x480 in 256 colors along with decent double-buffering. ''Pseudo-truecolor'' was an 18-bit color mode based on separate red, green and blue scanlines in Mode X.
 
Drawing 2D art for newly invented graphics modes often require sceners to first write graphics editors of their own.
 
===Music===
 
Music is considered essential to demos. The lack of music is generally tolerated only in the most restricted intro categories (4096 bytes or less).
 
The music in the earliest cracktros and demos was often [[ripping|ripped]] from games. However, some of the groups of the time started to create demo music of their own quite early, and some groups, such as [[Vibrants]] and [[Maniacs of Noise]], even specialized in music.
 
"Oldskool" demo songs are typically [[chiptune]]s similar to the [[video game music]] of the 1980's. The chiptune style was also used in several Amiga and PC intros of the 1990's due to the lack of need for large and storage-consuming samples.
 
The use of sample-based [[tracker]]s greatly affected the styles of demo music, making it possible to closely imitate [[techno music]] and many other genres of [[electronica]]. Even today, most of demo music is electronic music, even though the use of streaming formats allows the use of virtually any music in the soundtrack.
 
Many demo groups have written music editors of their own. Well-known examples include the classical PC trackers [[Scream Tracker]] and [[FastTracker]] by [[Future Crew]] and [[Triton]] respectively, and the modular synthesizer [[Jeskola Buzz|Buzz]] by [[Jeskola]]. Nowadays, most demo musicians use [[music sequencer]]s and other professional tools for creating demo music.
 
In most demos, the music is played back by a stock player routine such as a [[module file|module player]], [[MP3]]/[[Vorbis]] player or a routine specific to a music editor. Specialized players are also rather common, particularly in size-restricted intros. Modern 4K and 64K intros often contain a [[software synthesizer]] which may even have been written with a specific song in mind.
 
===Graphics===
 
In demoscene parlance, ''graphics'' or ''GFX'' typically only includes the work of the ''graphician'' - that is, still images, textures, 3D scenes, 3D objects and color schemes. Effects and other code-related visualization is usually not regarded as graphics.
 
The traditional form of graphics art in demos is [[pixel art]], which has been made with dedicated editors or commercial graphics software such as [[Deluxe Paint]]. The still images in modern PC demos are usually made with industry-standard software such as [[Adobe Photoshop]].
 
The technical skills of an artist were often stressed far more than originality or imagination, which gave birth to many graphics-related cliches in the demoscene art of the 1990's. Sci-fi and fantasy themes with dragons, swords and spaceships were very common, as were images of women, naked or otherwise.
 
The earliest 3D objects and scenes in demos were often very simplistic and were constructed by the coder, often without any modeller-like software whatsoever. Nowadays, many demos have several complex 3D scenes but lack still art entirely.
 
In the mid-1990's, many groups had advanced 3D routines capable of dealing with complex objects but lacked members skilled or interested in 3D modelling. This lead many demos to only have simple procedural objects such as [[torus]]es or example file objects such as ducks and teacups. The use of these stock objects is the origin of a lot of insider humor within the demoscene.
 
== Specific platforms ==
 
* [[Amiga demos]]
* [[Apple IIgs demos]]
* [[Atari demos]] (Atari ST)
* [[Commodore 64 demos]]
* [[ZX Spectrum demos]]
* [[Dreamcast Demos]]
* [[Text mode demos]]
 
== See also ==
* [[Demoscene]]
* [[List of demos by year]]
 
[[Category:Computer graphics]]