64kB 演示,它们是如何工作的?

发布于 2024-11-08 16:35:42 字数 133 浏览 0 评论 0原文

我见过一些节目展示了令人惊叹的高度详细的 3D 场景和配乐,但令我震惊的是它们都小于 64kB!这些程序如何运作?

在此处输入图像描述

I've seen some programs showing amazing highly detailed 3d scenes with soundtracks, but what shocked me is that they are all smaller than 64kB! How do these programs work?

enter image description here

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

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

发布评论

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

评论(3

开始看清了 2024-11-15 16:35:42

他们按程序生成内容。即他们不添加 3D 模型、位图、基于样本的音频文件...而是从代码或一些低细节表示生成。

使用自相似性(分形)并通过组合简单的构建块和公式来构建复杂的数据通常是紧凑表示的关键。

音频可以以某种类似 MIDI 的格式存储,其中存储不同的音符。

纹理是结合过滤器、分形等生成的......谷歌搜索“Perlin 噪声”作为一个简单的例子。 展示如何从柏林噪声创建截然不同的纹理

3D 模型可能有一些使用公式进行几何描述,并使用类似于程序纹理的技术添加细节。


大多数使用一些运行时解包器。即您的正常可执行文件大于限制并使用 exe 加壳器进行压缩。演示通常不使用 UPX,而是使用专门的加壳器,它们具有非常小的加载器/解壳器,甚至可能泄漏内存(如果您可以安全几个字节,谁会关心内存泄漏)。

They generate their content procedurally. i.e. they don't add 3d models, bitmaps, sample based audio-files,... but generate that from code or some low detail representation.

Using self similarity(fractales) and building complex data by combining simple building blocks and formulas is usually the key to a compact representation.

The audio could be stored in some midi like format where the different notes are stored.

The textures are generated combining filters, fractales,... google for "Perlin noise" for a simple example. Shows how to create very different textures from perlin noise

3D models probably have some geometric description using formulas and the detail is added with techniques similar to procedural textures.


And most use some runtime unpacker. i.e. your normal executable is larger than the limit and gets compressed with an exe packer. Demos usually don't use UPX, but specialized packers which have a very small loader/unpacker and might even leak memory(who cares about memory leaks if you can safe a few bytes).

ヤ经典坏疍 2024-11-15 16:35:42

过去,它们是用汇编语言编写的 COM。甚至还有 16kb 的演示。
我非常喜欢这些演示,这就是为什么汇编是我学习的第一种编程语言。我从未成功创建过真正的演示,但我能够创建一个病毒来清除我的硬盘。我没有源代码;)

Back in the day they were written in assembly language as COMs. There were even 16kb demos.
I liked those demos very much and that's why Assembly was the first programming language I learned. I never managed to create a real demo but I was able to create a virus that cleared my hard disk. I don't have source code ;)

迷乱花海 2024-11-15 16:35:42

它们是:

  • 没有无用(原文如此!)外部库的代码(你真的应该知道你需要什么来制作它),
  • 着色器编译器,压缩器等
  • 功能性3D图形和2D纹理制作器(但确定性和恒定性,但与许多参数相关) ,
  • 程序音频制作者(每次都相同)。

示例(代码示例!)可以在这里找到:

http://www .displayhack.org/2012/the-great-demoscene-sourcecode-giveaway/

别傻了 - 只要使用谷歌!

They are:

  • code without useless (sic!) external libs (you really should know what you need to make it),
  • shaders compilers, compressors etc.
  • functional 3d graphics and 2d texture makers (but deterministic and constant, but related with many parameters),
  • procedural audio makers (the same each time).

Examples (code examples!) could be found here:

http://www.displayhack.org/2012/the-great-demoscene-sourcecode-giveaway/

Don`t be stupid guys - just use google!!!

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