blitz3d-decomp
它能做什么
这项技能对较早的 Blitz3D 游戏进行逆向工程,使其逻辑能够被理解并移植。适合开发自己的游戏或开源许可游戏的开发者,并会提醒注意素材版权。
适用场景
- ✓当你想了解一款较早的 Blitz3D 游戏内部如何运作时。
- ✓当你计划在其他引擎中重建某款 Blitz3D 游戏的逻辑时。
- ✓当你想转换你有权使用的游戏中的动画 3D 模型时。
技能链接
https://github.com/rehan-remade/universal-modder/blob/main/.agents/skills/blitz3d-decomp/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请反编译这款 Blitz3D 游戏,让我能够阅读源代码,并在其他引擎中重建其逻辑。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会使用反汇编工具,从游戏文件中还原可读的 Blitz 源代码,然后把这份源代码作为移植的规格说明。反编译的文件不会放入共享项目中,并且会注明哪些内容可以再分发。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Blitz3D decompile and port
Blitz3D games ship as one exe: the runtime in .text and the compiled game in a resource module that
the runtime links at load. Ghidra on the exe shows only the runtime. The route that works:
B3DDecomp disassembles the module and decompiles it to Blitz source. Then the source is the spec for the
port, and the original game stays the oracle.
Keep every disassembly and decompile outside any repo (convention: ~/<game>-decomp/), and never
publish them; the scripts here are fine to keep. Leave proprietary DLLs that forbid decompiling alone: their
export names in the exe are enough. Journal in the mod's MODLOG.md.
Read the source when there is one: SCP: Containment Breach (Regalis11/scpcb) and its Ultimate Edition Reborn fork (Jabka666/scpcb-ue-my) are open source under CC BY-SA 3.0.
What a port may use. A port that re-expresses a game's logic, or converts its models, keyframes, textures or sounds, redistributes that game once it is published or uploaded (to Roblox too). Port only what the user has the rights to: their own game, or an openly licensed one on its terms (SCP: Containment Breach: credit it and keep the port under CC BY-SA 3.0, and check each asset's credits, since fan games mix licences). Anything else stays a private study: nothing from it is uploaded or published.
1. Tools
- B3DDecomp (juanjp600/B3DDecomp, C#, GPL-3): clone outside the repo, then
dotnet build Blitz3DDecomp.sln -c Release. It needs a .NET 8 SDK; a user-local one installs without admin (dotnet-install.ps1 -Channel 8.0 -InstallDir <dir>). Run withDOTNET_ROLL_FORWARD=Majorandbin/Release/net8.0onPATH: the decompiler startsBlitz3DDisasmby name. - If one function aborts the whole run, apply
references/b3ddecomp-skip-failures.patch (
git apply; made on commit 2b3148b): the decompiler then skips a function it can't finish, with astep5 failedline, instead of stopping.
Done when Blitz3DDecomp.exe and Blitz3DDisasm.exe build.
2. Disassemble and decompile
Blitz3DDecomp.exe <copy of game.exe> writes <game>_disasm/ (Code/ per function, Type/, Strings.txt,
BuiltIn/, Libs/, BuiltInSymbols.txt), then decompiles it to <game>_decomp/. Games built from SCP:
Containment Breach's code need the game's fmod.decls as a second argument (B3DDecomp's README: the shipped
decls drop a parameter from FSOUND_Stream_Open).
When it still aborts, the exception names the construct. Never make a type setter silently ignore writes to get past one: the type propagation then loops forever with no output.
Protected builds: stop. Some builds are protected against this step: a modified compiler and runtime
hash every function, type and builtin name (B3DDecomp stops with Unrecognized function: @_builtIn_f<garbled>; SCP: Containment Breach 2's client is built this way), or the module is encrypted.
Those are protections the developer added against decompiling. Don't reverse them: tell the user and stop
(skills/mod-any-game/references/safety.md). Current B3DDecomp undoes one of them by itself, without saying
so: an XOR on a .b3dmod section. List the exe's sections first (objdump -h, or any PE viewer) and stop if
it has one.
Done when <game>_decomp/ holds Main.bb, Functions/, Types/ and Decls/ and the run prints
at most a handful of step5 failed lines.
3. Find the system
- Strings first: an asset path or sound the system loads (
grep -l StringConstant_<n> Code/*). - Data-driven templates: the init function stores constants into a template per item. If the game has an addon/JSON loader, it names every field.
Done when every number the port will use is traced to the line that sets it and the line that reads it.
4. Port
Read references/blitz-runtime.md before writing port code: Blitz3D's clock,
Animate, CurveValue, Euler angles, Rnd and entity calls behave in ways a straight transcription gets wrong.
For animated .b3d models (viewmodels, rigs, keyframes) into Roblox, follow
references/b3d-to-roblox.md; its scripts are in scripts/roblox/.
Port step for step: same order, same constants, same tick. Mark every deviation in a comment with the reason. The rights rule above covers the code as much as the models.
5. Verify against the oracle
Measure the port against the decompiled numbers in the engine, not by eye: rates (shots per second at
常见问题
我可以发布任何游戏的移植版本吗?
不可以。这项技能要求只移植你拥有权利的内容,例如你自己的游戏或开源许可的游戏。
它能处理受保护的游戏吗?
这项技能要求对任何条款禁止反编译的专有文件不做处理。
反编译的文件保存在哪里?
根据该技能的说明,它们保存在任何项目文件夹之外,并且绝不公开发布。
详情
作者的原始描述
Decompile a Blitz3D game to readable Blitz source with B3DDecomp and port what it does to another engine. Covers SCP - Containment Breach-era and other .bb games, B3DDecomp, Blitz3D runtime behaviour (fixed tick, Animate, CurveValue, Euler angles, quaternions, Rnd), animated .b3d models (viewmodels with bones and keyframes) into Roblox, and where to stop (builds protected against decompiling, games and assets the user has no rights to). Use when a Blitz3D game's code or animated models are needed.
热度
- GitHub 星标
- 9.3k
- 排名
- #12283
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …