DOOM README

The project's README from github.com/id-Software/DOOM. As one markdown file: README.md.

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.

The bad news: this code only compiles and runs on linux. We couldn't release the dos code because of a copyrighted sound library we used (wow, was that a mistake -- I write my own sound code now), and I honestly don't even know what happened to the port that microsoft did to windows.

Still, the code is quite portable, and it should be straightforward to bring it up on just about any platform.

I wrote this code a long, long time ago, and there are plenty of things that seem downright silly in retrospect (using polar coordinates for clipping comes to mind), but overall it should still be a usefull base to experiment and build on.

The basic rendering concept -- horizontal and vertical lines of constant Z with fixed light shading per band was dead-on, but the implementation could be improved dramatically from the original code if it were revisited. The way the rendering proceded from walls to floors to sprites could be collapsed into a single front-to-back walk of the bsp tree to collect information, then draw all the contents of a subsector on the way back up the tree. It requires treating floors and ceilings as polygons, rather than just the gaps between walls, and it requires clipping sprite billboards into subsector fragments, but it would be The Right Thing.

The movement and line of sight checking against the lines is one of the bigger misses that I look back on. It is messy code that had some failure cases, and there was a vastly simpler (and faster) solution sitting in front of my face. I used the BSP tree for rendering things, but I didn't realize at the time that it could also be used for environment testing. Replacing the line of sight test with a bsp line clip would be pretty easy. Sweeping volumes for movement gets a bit tougher, and touches on many of the challenges faced in quake / quake2 with edge bevels on polyhedrons.

Some project ideas:

Port it to your favorite operating system.

Add some rendering features -- transparency, look up / down, slopes, etc.

Add some game features -- weapons, jumping, ducking, flying, etc.

Create a packet server based internet game.

Create a client / server based internet game.

Do a 3D accelerated version. On modern hardware (fast pentium + 3DFX) you probably wouldn't even need to be clever -- you could just draw the entire level and get reasonable speed. With a touch of effort, it should easily lock at 60 fps (well, there are some issues with DOOM's 35 hz timebase...). The biggest issues would probably be the non-power of two texture sizes and the walls composed of multiple textures.

I don't have a real good guess at how many people are going to be playing with this, but if significant projects are undertaken, it would be cool to see a level of community cooperation. I know that most early projects are going to be rough hacks done in isolation, but I would be very pleased to see a coordinated 'net release of an improved, backwards compatable version of DOOM on multiple platforms next year.

Have fun.

John Carmack 12-23-97

Copyright (c) ZeniMax Media Inc. Licensed under the GNU General Public License 2.0.

DOOM (id-Software/DOOM)

Searching Database…

19.7K ·GitHub
这是什么?这是 DOOM 的官方 1997 年源码发布版。DOOM 是 id Software 在 1993 年推出的第一人称射击游戏,此次发布仅限非营利用途,并附有 John Carmack 的说明。
这是完整的可玩游戏,还是只有引擎源码?只有引擎源码。要真正玩起来,还需要一份 DOOM 的数据文件(WAD)。
我该怎么让它跑起来?在 Linux 机器上编译 C/C++ 源码。DOS 版本无法发布,原因是其中用到了一个有版权的声音库。
玩它需要原版 DOOM 的数据文件吗?需要。游戏素材要用 DOOM 某个正式版本的真实副本。如果你没有,README 建议去软件商店查找。
它能在 Windows 上运行,还是只能在 Linux 上?按发布时的状态,它只能在 Linux 上编译和运行。id 团队当时做的 Windows 移植版没有包含在内,不过文件说明代码可以移植到其他平台,只是需要一些工作量。
这个源码发布主要面向谁?面向业余爱好者和引擎程序员,适合想研究、移植或扩展原版 DOOM 渲染器和游戏逻辑的人。
原版 DOOM 引擎用了什么渲染技术?它采用 BSP 树遍历来渲染,使用恒定 Z 值的水平线和垂直线,并按区段固定光照着色。Carmack 认为这一技术即使回过头看,依然是根本上站得住脚的。
README 对想研究这份代码的人有哪些项目建议?Carmack 建议把它移植到其他操作系统,增加透明或上下看等渲染功能,加入跳跃或蹲下等玩法,实现联网的客户端/服务器对战,或者做一个支持 3D 加速的版本。
为什么没有发布 DOS 版本的源码?它依赖一个有版权的声音库,而 id Software 无权再分发该库,所以只能发布 Linux 移植版。
Carmack 认为原始代码里最大的设计失误之一是什么?他特别指出移动和视线碰撞检测写得很混乱,而且比实际需要的慢。原因在于 BSP 树本可以复用于环境测试,而不必另外做一套线段裁剪。
Size
0.1 MB
Stars
19.7K
Updated
CommitJan 16
Age
14y
Commits · 90 Days