DOOM, Emacs
摘要
这是一个在 Emacs 中通过原生模块运行经典游戏 DOOM 的技术演示。实现基于 doomgeneric,只需在 C 中实现 DG DrawFrame 等少量函数,并用 Elisp 作为胶水。它使用了尚未合入 Emacs 主线的 Canvas API(目前以补丁形式提供),需要先给 Emacs 源码打补丁并重新编译,再运行 run.sh 编译模块并加载 WAD 文件。文中附有相关补丁和演示链接。
荐读理由
该演示展示了 Emacs 通过原生模块和 Canvas API 实现图形渲染的可行路径,如果你在开发 Emacs 插件或需要高性能图形界面,可参考其补丁和模块结构;但 Canvas API 尚未合入主线,迁移成本较高,且与 AI 工程关联弱。
原文
DOOM on Emacs
This is DOOM running inside Emacs via a native module. The port is based on doomgeneric such that only a handful of functions like DG_DrawFrame need to be implemented in C with some Elisp code as glue. It uses the native Canvas API which is not yet part of the Emacs source tree, and currently available for download as patch. See further canvas links below.
Running DOOM
In order to run DOOM, you first need to apply the Canvas patch to the Emacs source and recompile Emacs. Then execute ./run.sh to compile the module and start DOOM on Emacs. You will need a WAD file which contains the game data. The file doom1.wad is freely available.
Canvas links
这条对你有帮助吗?
