我的github
Here it is, at long last.  The DOOM source code is released for your
non-profit use.  You still need real DOOM data to work with this code.
If you don't actually own a real copy of one of the DOOMs, you should
still be able to find them at software stores.

Many thanks to Bernd Kreimeier for taking the time to clean up the
project and make sure that it actually works.  Projects tends to rot if
you leave it alone for a few years, and it takes effort for someone to
deal with it again.

原理:
二维的矢量线->竖起的面->贴图做墙面。
点在二维平面上移动
根据透视原理,近大远小,实时生成3d透视图投影图。

参考:https://github.com/id-Software/DOOM

>>PS:坏消息是:这段代码只在linux上编译和运行。我们无法发布dos代码,因为我们使用了一个受版权保护的声音库(哇,这是一个错误吗——我现在自己写声音代码),老实说,我甚至不知道微软对windows的(声音)端口发生了什么。
尽管如此,代码还是非常可移植的几乎在任何平台上都能看到。
我很久很久以前就写过这段代码,现在回想起来,有很多事情看起来非常愚蠢(我想到了使用极坐标进行剪裁),但总的来说,它仍然应该是一个有用的实验和构建基础。
posted on 2023-04-26 00:50  XiaoNiuFeiTian  阅读(261)  评论(0编辑  收藏  举报