"Landfill in the Clouds" devlog

2024-09-30
#garbage

This post inevitably contains spoiler for the level “Landfill in the Clouds”. Proceed with caution.

Hints

General hints for the first few sectors:

  • Maintain a high speed if possible. You will reach the end before even noticing it.
  • Remember how versatile the paper ball is.
  • There’s always another way.
  • You have infinite attempts. Don’t be afraid of restarting.

For the final section:

  • Heed the warnings. HEED THE WARNINGS!
  • If you ignore the last hint, you get what you deserve.
  • Like in many real life situations, not everything around you is useful.
  • Sometimes taking a dangerous step is mandatory.

New gameplay mechanics in this level

Random level generation

Arguably the biggest contribution of this level. Despite using a very crude approach, the result is still pretty satisfying – both to look at and to navigate through.

A more methodical approach is definitely possible (e.g. randomly generated labyrinth), but I’ll leave that for someone else to implement.

Dumpster fire

A weird Americanism (but one that makes sense if you think about it) that somehow made into this level in its literal form.

Purely cosmetic. Won’t even burn the paper if you somehow manage to fall into the dumpster.

The switch

Literally the most cliché mechanism in countless platformers. Now it’s also been introduced to Ballance. Triggers an annoying buzzer alarm when pressed.

“Energized Core”

This thing is here only because I don’t want to waste the explosion script that I wrote back in 2019. Animated in the exact way as an explosive found in Minecraft.

Mostly for decoration only. This idea may or may not be reused in the future. If so, it will be given a more useful role.

“Skill trolling”

This is the revenge of an unskilled player against the “competitive player camarilla” (don’t take this too seriously).

Vanishing balloon

Don’t know why but I’ve wanted to make something like this for quite a while now.

Animation sequence

A redo of the closing sequence in my previous custom level. This time improved and fully revamped.

Random facts on landfills

To be honest I don’t know why I added these. Maybe just to annoy the player LOL.

More background story

The idea of a randomly generated level has been in the text file referred to in the information page for quite a while. But it was deemed a pretty difficult one to execute – it’s not easy to generate levels that’s not completely trivial but still fun to play at the same time. To make things worse, implementing anything that’s mathematically intense in pure Virtools behavior script is a nightmare.

I’ve always been planning to make a level with a theme of decay too, not because the state of the game – that’s just a coincidence (by the way, I don’t even think this game is in a full downward spiral, especially not on the technical front where the game is being completely dissected and rebuilt), but instead because I’ve been fascinated by scenes showing decay of a formerly prospering place for quite some time. The event that kick started this project is me realizing that these two ideas could be combined. A state of chaos may be interpreted as a state of decay – something I told myself when I was trying to fit these two unrelated ideas together. At this point, I wasn’t even sure how well would this weird combination work: maybe randomly generated levels won’t be playable at all. So my initial plan is to play with this idea to make sure that it really works. But in my usual fashion, I was way ahead of myself and soon finding myself designing the level.

The first thing I decided on is the theme: if I’m going to randomly place things in the level, it will probably look pretty chaotic, and let’s be honest, crappy. All trash finally goes to the landfill (well, not literally but you get the point). That couldn’t be a more fitting theme. I gave the final section a twist so that the level doesn’t feel the same all the way through, and the twist plays into one idea listed in my collection perfectly: pressing the switch emptying the final landfill, revealing a hidden path that leads to the end of the level. I threw in a few other ideas in my collection for good measure. These are the ideas that I used for this level from the file:

  • physical switch
  • random level generation
  • something from Minecraft (you know which one appeared in the level)
  • “skill trolling”
  • puzzle with unused elements / elements deliberately causing confusion

When I was modeling the floor for the puzzle that appeared in the final section, I realized the original design I had in mind is completely unsolvable. So I had to improvise a little bit. This unintentionally upped the complexity of the puzzle by a notch. Anyway, despite my best efforts, to me this puzzle still seems “forced” and a little bit out of place. This is barely surprising because my brain is dysfunctional enough that the vast majority of puzzle games on the market is out of reach for me… let alone the idea of designing a good puzzle of my own. This entire level still feels like a bunch of discrete ideas loosely put together anyway.

In addition to all that there is at least one alternative solution to puzzle, which I didn’t bother blocking. That solution would require pushing a box over unguarded path, so if you pulled it off, you fully deserve it.

The modeling process is completely done in Blender on my workstation computer which runs Linux. Thanks to the Blender plugin made by yyc12345, this process was relatively free from pain and suffering besides some minor annoyances. I provided my feedback to the developer regarding how to fix these annoyances. Everything can now be done within Blender without requiring any external tools (If you’re not making a scripted level, you don’t even need to postprocess the exported file in Virtools – the exported NMO file itself will simply work in the game as long as you have all the required elements.) – this has been a massive improvement compared to when I first started experimenting making renders of the game in 2018. That was a time when even importing a level into Blender would inflict major emotional damage. I still have to relearn all the key bindings in Blender every time I use it though. But I genuinely hope the Blender workflow can be more popular in the future, and I would strongly encourage anyone who’s new to level making and looking into getting started to at least try out the Blender workflow, as it has become extremely streamlined nowadays.

Tuning the difficulty of the randomly generated parts was an extremely tedious and painful process. I must have spent more than 20 hours just tweaking the numbers used by the level generator. Due to the random nature of the level, I had to go through the level multiple times every time I changed something just to make sure that I wasn’t only getting the easiest generation. When I made the first beta release, the consensus was that the level was still way too annoying to play through. Therefore I took the axe to the generator, lowering the overall difficulty significantly and hopefully made it much less irritating.

The level was simply called “Landfill” during its design phase. As the name of my last level caused some confusion, I decided against naming the level in an obscure fashion this time. For that reason it was almost released as “Landfill”. However I couldn’t resist the temptation to scorn the concept of “cloud computing”, so I stuck “in the clouds” to the end and called it a day.

Other noteworthy technical information

Sound compression

Virtools uses the WINMM’s ACM (Audio Compression Manager) infrastructure to decode sound data. Therefore it supports any format that are registered with the ACM. Windows provides out-of-the-box support for a compressed format called ADPCM (adaptive differential pulse code modulation). Files compressed by this codec is usually around a quarter of their original uncompressed size – not great but still a very significant reduction in size. It was the use of this codec that made it possible to ship this level with high quality sound effects while keeping the file size down.

The down side of this is that some so-called “light weight” installations of Windows have this ACM component stripped out. For this reason if you do not have msadp32.acm in your System32 folder (or SysWOW64 folder for 64-bit systems), these sound effects cannot be loaded.

Running Ballance in Virtools Dev

It is now possible to run Ballance within Virtools Dev. This is incredibly useful for debugging scripted levels.

This was made possible thanks to DoyaGu’s work, which completely suppressed my prior work “CK2Shim” done in 2020-2021. My previous work allowed behavior building blocks defined in libraries built for older versions of Virtools to be inserted using a newer version of Virtools Dev, but none of these building blocks can be executed correctly because the lack of translation of virtual function calls. This new work is based on a complete set of reverse engineered source code of these building block libraries, and they are nearly fully functional when built against a newer version of the Virtools SDK. Right now there are still some imperfections in this process, but still the value it provides cannot be understated.

The procedure for doing this hasn’t yet been made public at this time. I’ll update this post once the full instructions are made public.

Useless stuff

Content of the random messages in this level are based on information from the following articles:

https://greencoast.org/facts-about-landfills/
https://www.bvtrashvalet.com/5-facts-about-landfills/
https://en.wikipedia.org/wiki/Landfill
https://en.wikipedia.org/wiki/Landfill_restoration
https://en.wikipedia.org/wiki/Landfill_mining
https://en.wikipedia.org/wiki/Landfill_tax
https://en.wikipedia.org/wiki/Atari_video_game_burial

中文版

本文不可避免地包含大量对《云端掩埋场》的剧透。请谨慎阅读。

提示

前数小节:

  • 尽可能保持比较高的速度。这样在你还没注意到的时候你就可能已经到终点了。
  • 记得纸球的超强越野特性。
  • 总有别的路可以走。
  • 你有无数次机会,别害怕重开。

最后一小节:

  • 听劝。听劝!!
  • 如果你无视上一条提示,你会得到应有的报应。
  • 和现实一样,不是每样你周围的东西都是有用的。
  • 有时除了走一条险路你别无他法。

本关卡中的新游戏机制

随机路面生成

大概是本关最有特色的内容。尽管使用的生成方法十分原始,最终结果仍然看起来很有意思(玩起来也是——至少从某种程度上来说)。

更有规则的生成当然是可以做的,比如随机生成迷宫之类。但是这个点子我还是留给其他人来实现吧。

起火的垃圾桶

「Dumpster fire」,一个奇怪的美国表达方式。用以指代极其混乱的场面或者无可救药的情景。不过想想看还是挺形象的。以其字面意思出现在了本关卡中。

纯装饰作用。甚至不会烧坏你的纸球。

开关

在无数平台游戏中被用烂了的老套机制,现在也被引入到Ballance里来了。按下去时会发出很吵的警报声。

「充能核心」

这个东西在这里的唯一原因是因为我不想浪费2019年写的爆炸脚本。动效是直接从Minecraft的一个爆炸物那边照搬来的。

基本只有装饰作用。这个机关将来可能还会再次出现,不过到时候会给它一点实际的作用。

「高技巧玩家诱饵」

这是一个低技术力玩家对高水平玩家精英会的复仇(不是

消失的飞船

不知道为什么,但是我想做类似这个的东西也已经有段时间了。

退场动画

《彷徨梦》的退场动画的改进版本。

掩埋场主题的随机小知识

我也不知道我为什么想加这个。可能是单纯想找不自在吧(笑

制作花絮

做一个随机生成的关卡的想法躺在我的那个脚本图点子文档里已经很久了。但是我意识到想把这个点子做好是比较有难度的——生成难度合适并且有可玩性的关卡没有那么简单。而且在Virtools中使用纯脚本实现任何包含数学运算的过程都无异于自虐,这使得我一直没有把这个想法转换为成品。

我还一直想做一个以衰败为主题的地图。倒不是因为这个游戏本身所处的状态——这顶多算一个巧合(顺便,我甚至觉得这游戏没有完全处在衰落模式里,尤其是在彻底解剖游戏的内部原理这个方面。)。实际原因是我一直对展示一个曾经繁荣的地方如今逐渐衰败的场景有一种来历不明的迷恋。我突然意识到这个主题和前面的点子是可以结合到一起的。“混乱的状态也可以算是衰败的一种吧”,我如此说服了我自己将这两个本无关联的想法结合到了一起。当时我甚至不知道这个奇怪的组合会搞出什么样的结果,也许随机生成的关卡是根本没法玩的。所以我一开始的计划是先测试一下随机生成方案,至少证明它有可行性。但是如同我的一贯作风,在我意识到这点之前我已经把关卡设计做了一半了。

我第一个决定的事项是地图的主题:如果是随机生成的关卡的话,关卡本身看起来大概会很混乱,而且坦白来讲的话,会很垃圾。所有垃圾最终都去了掩埋场(不是完全准确的描述,但是大致就是怎么个意思)。这个主题简直不能更合适了。为了不让整个关卡从头到尾玩起来感觉都一样,我在最后一个小节里加了一点「料」。这个「料」正好符合我的一个点子:按下开关之后最后一个掩埋场会被倒空,露出隐藏的引向终点的路。在正式开始设计之前我又顺便从我的那堆点子里面随便挑了几个加进去。以下是我最后采用的所有点子:

  • 物理开关
  • 随机关卡生成
  • 随便一个来自Minecraft的东西
  • 「高技巧玩家诱饵」
  • 有未使用/刻意引起迷惑的机关的谜题

当我在为最后小关的谜题的路面建模的时候,我意识到我一开始在图纸上画的设计完全无解,所以我被迫即兴作出了一点修改。这无意间略微提高了这个谜题的难度。即使我已经尽力地让这个谜题更好地融入这个关卡了,某种程度上这个小节还是有点不合情理的感觉。其实对此也没什么可惊讶的,毕竟对我的不争气的脑子来说,市面上大多数解谜类游戏都超出了我的能力范围,更别说设计我自己的谜题了。不过话说回来整个关卡也不过就是一堆离散的点子被强行堆在了一起罢了。

除此之外这段还有至少一个非预期解法。我没有刻意禁掉这个解,因为这个路线需要在没有保护措施的路面上推着箱子走相当长的一段距离。如果你用这种解法成功通关了的话,你的通关也完全是应得的。

整个建模过程都是在我的运行Linux的工作站电脑上使用Blender完成的。多亏了yyc12345的插件,现在这个过程整体上没有太多痛点——顶多有几个小问题。关于如何解决这些小问题,我已经向开发者提供了我的反馈。现在一切建模工作均可在Blender一个软件内完成(如果你不是在制作脚本图的话,你甚至不需要用Virtools处理从Blender里导出的NMO文件。只要所有必需的基本元素都在,这个NMO文件可以直接在游戏中使用。)——相比2018年我刚开始在Blender里研究制作Ballance渲染图时这简直是翻天覆地的变化。当时甚至将Virtools数据导入Blender中都是一个痛苦的过程。虽然现在每次用Blender时我还是得重新学习它的快捷键,但是我还是真心希望Blender制图工作流未来可以更加主流,尤其是在国内社区中。对于正在考虑制作第一张地图的制图新人来说,我会强烈建议尝试一下Blender制图工作流,因为如今这个工作流已经非常易用了。

在设计阶段这个关卡的名字就叫「掩埋场」。因为我的上一张图的命名导致了一些程度上的迷惑(比如STERD在其通关视频描述中写道「我没彷徨也没梦,我懵」),这次我不打算在名字里搞奇怪的名堂了。因此这个关卡差点被最终定名「掩埋场」。不过我无法阻止我的嘲讽「云计算」概念的冲动,所以最后在前面加上了「云端」。

关卡内文字中英文对照

Welcome to the Landfill.

It’s easy to get stuck here. If you need a lifeguard who moves you back to your last checkpoint when you haven’t moved in 10 seconds, press F now. You may dismiss these messages by pressing Enter.

欢迎来到垃圾掩埋场。

在这里冒险很容易把球卡住。如果你需要在本关内启用10秒内不动则自动将你送回上一个出生点的功能,请现在按下F键。
按回车可以立即关闭本关卡中的消息。

Landfills are the oldest form of waste management.

掩埋场是最古老的废弃物处置方式。

Landfills emit decomposition gases over time, roughly half of which in volume is methane.

随着时间的推移,掩埋场会排放分解气体。该气体的按容积计大约一半是甲烷。

Due to its high methane content, landfill gas is flammable. It can be used to generate electricity.

由于掩埋场废气中甲烷的占比高,它可以燃烧,并且可以用来发电。

Depending on its material, the time required for waste to decompose in a landfill varies. This usually lies within the range of decades and centuries.

垃圾在掩埋场中分解所需的时间取决于其材料。通常这个时间在数十年到数百年之间。

Some sources report that it could take more than 4000 years if glass were dumped into a landfill.

有资料声称如果玻璃被埋入掩埋场,其可能需要超过4000年才能完全分解。

Once filled up to its max capacity, a landfill can be capped and restored with vegetation.

在达到其最大容量后,掩埋场可以被封顶并用植被恢复地表外貌。

Vectors (in the pathological sense, not the mathematical quantity) can thrive near mismanaged landfills, spreading infectious diseases.

携带传染病的生物可在管理不善的掩埋场周围肆虐,传播传染性疾病。

Landfills were mined to reclaim valuable resources such as aluminum.

有的掩埋场由于为了回收铝之类的有价值的材料而被挖开过。

Landfills are taxed in a few countries.

有的国家对掩埋场征税。

ATARI buried thousands of cartridges for games that are widely considered failures in a landfill during the infamous video game crash of 1983.

ATARI在著名的1983年美国电子游戏大萧条中将数千张被人广泛认为是失败作品的游戏卡带埋入了掩埋场。

Legend has it that rails around here are cursed… You have been warned.

传说这附近的钢轨有邪气……

How dare you mess around on my monorail!

大胆!竟然敢在我的单轨上放肆!

其他值得一提的技术信息

音频压缩

Virtools使用WINMM的ACM(音频压缩管理器,Audio Compression Manager)设施来解码音频数据。于是所有在ACM中登记的格式Virtools都可以支持。Windows自带了针对一个叫做ADPCM格式的有损音频编码的解码器。这个编码大致可以将未压缩数据压缩到原大小的四分之一——对音频数据来说不算多好的压缩率,但是仍然能显著减小文件大小。因为使用了ADPCM编码的音效,本关卡才有可能在使用了高音质的音效数据的同时把文件大小控制在合理的范围之内。

使用ADPCM编码的音频的坏处是有些所谓「轻量」的Windows安装会移除这个ACM组件。因此如果你的系统的System32目录(64位系统下则是SysWOW64目录)中没有msadp32.acm这个文件,你将无法听到本关卡中的音效。

在Virtools Dev环境中运行Ballance

现在Ballance可以运行在Virtools Dev环境中了。这对脚本地图的开发有着极大的价值。

这背后的工作是由DoyaGu完成的,同时这个项目也取代了我2020-2021年的CK2Shim工程。CK2Shim可以让新版本的Virtools加载为旧版本Virtools编译的逻辑块库并插入其中定义的逻辑块,但是因为没有处理虚函数调用,这些逻辑块在Virtools Dev中均无法正常执行。这个新工程则是基于原游戏逆向出的源代码,完全用新版本的Virtools SDK重新编译的。现在运行的效果还不是百分之百完美,但是它的意义依然不可小觑。

相关的步骤在本文完成时还没有公开。在公开时本文此处会加入相应的信息。

无聊内容

游戏中的随机消息是基于以下几篇文章中的内容撰写的:

https://greencoast.org/facts-about-landfills/
https://www.bvtrashvalet.com/5-facts-about-landfills/
https://en.wikipedia.org/wiki/Landfill
https://en.wikipedia.org/wiki/Landfill_restoration
https://en.wikipedia.org/wiki/Landfill_mining
https://en.wikipedia.org/wiki/Landfill_tax
https://en.wikipedia.org/wiki/Atari_video_game_burial