文章摘要
公共指挥官基恩论坛发布了《指挥官基恩1-3》的重构源代码,这是一个有趣的开发进展。
文章总结
重构版《指挥官基恩1-3》源代码发布
发布背景
在《指挥官基恩》35周年纪念之际,开发者K1n9_Duk3公开了重构版的《指挥官基恩1-3》完整源代码。该版本覆盖了从1990年11月的《基恩1》测试版到罕见的Precision Software Applications发行版(1.34版)的所有已知版本。
技术细节
1. 编译要求
- 大多数版本(1.31及更早)需使用Turbo C++ 1.00(非1.01版)和Turbo Assembler 2.0+。
- 后期特殊版本(如Gravis预注册版1.32和PSA版1.34)需Borland C++ 2.0。
- 通过LZEXE或PKLITE压缩后,生成的可执行文件与原版完全一致。
- 开发挑战
- 编译器差异:Turbo C++ 1.01无法生成与原版相同的代码。
- 变量排序问题:未初始化变量在BSS段的顺序受变量名影响,需通过随机生成变量名并测试哈希值来调整顺序(详见
BSSCHEAT.H和BSSCHEAT.EQU文件)。 - 代码复用争议:部分代码基于《The Catacomb》和《Hovertank》,开发者认为id Software可能未经授权使用了Softdisk的《Dangerous Dave》代码(如
IDLIB.C和IDLIB.ASM)。
社区反响
- 用户Multimania成功用Borland C++ 3.0编译了《基恩1》,但K1n9_Duk3指出高版本编译器可能导致变量顺序错误,引发严重问题。
- 用户Calvero发现1990年《Gamer's Edge Sampler》光盘中泄露的少量原始代码与重构版存在差异(如音效定义方式)。
- 开发者NY00123推测《基恩1-3》的代码架构介于《Hovertank 3D》和《基恩梦境》之间,并提及《Wolfenstein 3D》菜单函数名可能源自早期游戏。
未来计划
- 用户FribbulusXaxMan建议将代码上传至GitHub,但截至发帖未获回应。
- 社区期待通过源代码突破DOS版Mod的限制,但尚不确定技术瓶颈是否源于DOS系统本身。
资源链接
- 源代码下载
- 《BioMenace》重构代码参考
(注:原文中论坛导航、用户头像等非核心内容已省略,仅保留技术讨论与关键信息。)
评论总结
总结评论内容:
- 对Commander Keen项目的支持
- "Keeping commander keen alive should be a priority project for humanity!"(oaiey)
- "Can it help the progress of..."(newsre4der)询问项目进展
- 技术讨论
- 关于变量命名顺序的技术探讨:"Is the ordering the only thing that can be recovered from the binary?"(geon)
- 对代码重用效率的讨论:"Large amounts of code reuse seems like an important clue..."(kqr)
- 对游戏开发者的赞赏
- "These games ran so well on IBM XT computers...Carmack was a genius."(guidedlight)
- 提到开发效率:"The pace at which Id produced games has always been an inspiration..."(kqr)
- 版权和授权问题
- "This is released under GPL...Does he have the rights to actually release this?"(albertzeyer)
- 对"reconstructed"含义的质疑:"What does 'reconstructed' mean?"(albertzeyer)
- 网站访问问题
- "Site is intermittently becoming unavailable."(GaryBluto)
关键引用保留: 技术方面: "Large amounts of code reuse seems like an important clue as to how they were able to do that." "Carmack was a genius."
版权方面: "Does he have the rights to actually release this, and put it under GPL?" "What does 'reconstructed' mean? Is this disassembled?"