什么语言或方法允许图形和图像适合 64kb EXE 的音乐演示?

发布于 2024-11-14 01:14:07 字数 883 浏览 5 评论 0原文

64kb 编译的 exe 中,这些程序怎么可能生成如此疯狂的视觉效果,并配有匹配的音乐?

示例:幻影领主的 Ars Nova (演示运行的 YouTube 视频

该程序的大小只有 64kb!他们是怎么做到的?

他们是否在 DirectX 中使用某种预先存在的对象、着色器等或类似的东西?

他们甚至使用什么语言?有关于这些东西的某种指南吗?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

一杆小烟枪 2024-11-21 01:14:07

64K 演示(例如您链接的演示)通过程序生成纹理和模型来节省空间。 模块文件通常用于音乐,大多数乐器都是在代码中合成的。

这是重点。 只要有可能,他们就会使用代码生成内容,而不是显式存储数据。 (当他们明确存储内容时,它会被严重压缩)。

然后使用可执行压缩器和其他技巧来最小化编译代码本身的大小。

不幸的是,演示很少与源代码一起发布。我确实在 scene.org 上找到了一些演示源的集合,但我自己还没有检查过其中任何一个。

据我所知,综合指南也并不多,但网络上散布着针对各种主题的指南。 Hugi 杂志 是此类文章的一个很好的来源,我特别建议您查看< a href="http://www.hugi.scene.org/main.php?page=hugise01" rel="noreferrer">特别版 #1 因为它包含大量演示编码文章。

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.

时光沙漏 2024-11-21 01:14:07

这是一个很酷的演示,我很高兴人们仍在做这种事情……但我不会说有任何“魔法”在起作用。

就物体的“DNA”而言,这里没有什么太详细的内容。立方体、赛车、国际象棋棋子、球形弹珠、躯干。他们几乎可以自由地选择他们想要压缩得好的模型……或者丢弃任何压缩得不好的细节。缺乏期望或满足某种规格对他们有利,在这里。他们甚至可以按大小对 3D 库中的对象进行排序,然后说:“哦,那个很小,但看起来仍然很酷,让我们使用那个。” :)

如果你想变得棘手的话,有很多方法可以改变代码的大小。我发现这是一个有趣的阅读:

http://www.muppetlabs.com /~breadbox/software/tiny/teensy.html

但我怀疑他们是否对此感兴趣。他们可能只是避免不必要的依赖关系并在相当低的级别进行编码。常识和可执行压缩可以大大降低大小:

http://en.wikipedia.org/wiki /UPX

此类音乐通常是使用“跟踪器”,并且这些文件的大小比 MP3 文件更接近 MIDI 文件。播放例程相当小...这个名为“MiniFMod”的程序可以播放 XM 文件,并声称只为您的 EXE 大小添加 5K:

http://www.fmod.org/index.php/download#FMODMini

与音乐同步实际上并不是一个技术问题,而是一种艺术选择。该演示大概被限制为以一致的速度运行......并且音乐每次播放的时间都相同。

It's a cool demo, and I'm glad people are still doing this sort of thing...but I wouldn't say there's any 'magic' at work.

In terms of the "DNA" of the objects, there's nothing too detailed here. Cubes, a race car, chess pieces, spherical marbles, torsos. They're pretty much free to pick what models they want that compress well...or to throw out any details that don't compress well. The lack of expectations or meeting some kind of spec works in their favor, here. They can even sort objects in a 3D library by size and go "Oh, that one's small but still looks cool, let's use that." :)

There's lots of ways to mess with sizes of code if you're going to get tricky. I found this to be an interesting read:

http://www.muppetlabs.com/~breadbox/software/tiny/teensy.html

But I doubt they're getting that fancy with this. They are probably just avoiding unnecessary dependencies and coding at a fairly low level. Common sense and executable compression can push the size down quite a bit:

http://en.wikipedia.org/wiki/UPX

Music for things like this is typically done with a "tracker", and the files are more on the scale of the size of a MIDI file than an MP3. The playback routines are fairly small...this one called "MiniFMod" can play XM files and claims to add just 5K to your EXE size:

http://www.fmod.org/index.php/download#FMODMini

Syncing with the music isn't really a technical issue so much as one of artistic choice. The demo presumably is throttled to run at a consistent speed...and the music takes the same time to play each time.

他夏了夏天 2024-11-21 01:14:07

主代码本身生成纹理、声音和演示中的所有对象。分形、变形、已生成对象的广泛使用(在演示时间线中)和一些其他技术用于对象的紧凑算法编码。然后使用 exe 压缩器压缩代码。此外,还使用了一些非常重要的技术来最小化代码大小。

另请参阅有关此的亚文化

The main code itself generates textures, and sound and all objects in demo. Fractals, deformations, extensive usage of already generated objects (in demo timeline) and some other techniques are used for compact algorithmic coding of objects. Then code is compacted using exe-compressors. Also some very non-trivial techniques are used to minimize code size.

See also subculture around this.

断桥再见 2024-11-21 01:14:07

从计算开始就存在组装竞赛。就像任何比赛一样,你创造技巧,而这些技巧为该比赛找到了参考。

一般使用的语言是汇编语言(继二进制之后最接近机器的语言...)
为什么被称为继二进制之后最接近机器的。因为它涉及复杂的内存管理、访问设备的复杂指令集等等......

there is asembly competitions since the begining of computation. Like any competition you create tricks and those tricks found the reference for that competition.

the langage generally used is assembly language (the closest language to the machine after the binary ...)
Why it is called the closest to the machine after binary. Because it involve complex memory managements, complex set of instructions to reach a device etc...

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文