Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What languages or methods allow graphics & music demos to fit in 64kb EXEs?

How is it possible that in a 64kb compiled exe, these programs can generate such crazy visuals, complete with matching music?

An example: Ars Nova By Phantom Lord (YouTube video of the demo running)

This program's only 64kb in size! How did they do that?

Are they using some sorts of pre-existing objects, shaders, etc. inside DirectX or something like that?

What languages do they even use? Is there some sort of guide to this stuff?

  • EDIT: Another mind-blowing demo. How?

    http://www.scene.org/file.php?file=/demos/groups/farb-rausch/fr08_final.zip&fileinfo

  • EDIT: More demoscene stuff.

    I found some link to a group who make stuff like this and they released a product named .werkkzeug1 and some compression and audio tools but I can't still figure it out how it's possible. They even made a game with in 96kb.

    theproduct

like image 409
Synxmax Avatar asked Jun 07 '11 07:06

Synxmax


People also ask

What language is used for graphics?

The major graphics languages are GDI, DirectX, QuickDraw, Display PDF and OpenGL. Windows uses GDI and DirectX, while the Mac uses QuickDraw and Display PDF.

Which language is best for visualization?

Python. Python today is one of the most popular simple universal languages for data visualization and even more. It is often the best choice for solving problems in Machine Learning, Deep Learning, Artificial Intelligence, and so on.

Which language is used for multimedia?

The most widely used programming languages (see Table 9) in multimedia application development are HTML/DHTML, Visual Basic, Java, C++, SQL and Javascript.


1 Answers

64K demos such as the one you linked save space by procedurally generating textures and models. Module files are typically used for the music, with most of the instruments being synthesized in code.

That's the main point. Whereever possible, they generate stuff using code rather than storing the data explicitly. (And when they do store stuff explicitly, it is heavily compressed).

Executable compressors and other tricks are then used to minimize the size of the compiled code itself.

Unfortunately, demos are rarely released with source code. I did find a collection of some demo sources on scene.org, but I haven't checked any of them out myself.

There aren't many comprehensive guides either that I'm aware of, but there exist guides for various topics scattered around the web. The Hugi Magazine is one good source of such articles, in particular I would recommend checking out Special Edition #1 as it contains lots of demo coding articles.

like image 123
hammar Avatar answered Sep 28 '22 12:09

hammar