本文介绍了什么语言或方法允许图形&适合 64kb EXE 的音乐演示?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

一个例子:Ars Nova By Phantom Lord (演示运行的 YouTube 视频)

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

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

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

解决方案

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

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

可执行压缩器 和其他技巧随后用于最小化编译代码本身的大小.

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

我所知道的综合指南也不多,但存在散布在网络上的各种主题的指南.Hugi 杂志 是此类文章的一个很好的来源,特别是我建议您查看 Special Edition #1 因为它包含许多演示编码文章.

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?

解决方案

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.

这篇关于什么语言或方法允许图形&适合 64kb EXE 的音乐演示?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-26 04:22