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 года, шутера от первого лица 1993 года от id Software, опубликованный для некоммерческого использования с комментарием Джона Кармака.
Это полноценная игра или только исходный код движка?Это только исходный код движка. Для игры всё равно нужна настоящая копия файлов данных DOOM (WAD).
Как это запустить?Скомпилируйте исходный код на C/C++ на машине с Linux. Версию для DOS выпустить не смогли из-за звуковой библиотеки, защищённой авторским правом.
Нужны ли мне оригинальные файлы данных DOOM, чтобы играть?Да, нужна настоящая копия одного из релизов DOOM с игровыми ресурсами. В README советуют поискать в магазинах программ, если у вас её нет.
Работает ли это на Windows или только на Linux?В выпущенном виде код собирается и запускается только на Linux. Версия для Windows, которую тогда сделала команда id, не включена, хотя код описан как переносимый на другие платформы с некоторыми усилиями.
Для кого предназначен этот релиз исходников?Для энтузиастов и программистов движков, которые хотят изучить, перенести или доработать оригинальный рендерер и игровую логику DOOM.
Какую технику рендеринга использует оригинальный движок DOOM?Движок выводит изображение обходом дерева BSP, с горизонтальными и вертикальными линиями постоянной Z и фиксированным затенением для каждой полосы освещённости. Кармак, оглядываясь назад, считает этот подход фундаментально верным.
Какие идеи для проектов README предлагает тем, кто изучает этот код?Кармак предлагает перенести игру на другие ОС, добавить возможности рендеринга, например прозрачность или взгляд вверх и вниз, добавить игровые функции, например прыжки или приседания, сделать сетевую игру по схеме клиент/сервер или создать версию с 3D-ускорением.
Почему не выпустили исходники версии для DOS?В ней использовалась звуковая библиотека, защищённая авторским правом, на распространение которой у id Software не было прав. Поэтому опубликовали только версию для Linux.
Что Кармак называет одной из крупнейших ошибок проектирования в оригинальном коде?Он выделяет проверку столкновений при движении и прямой видимости как запутанную и более медленную, чем нужно. Дерево BSP можно было бы использовать и для проверки окружения, вместо отдельного отсечения линий.
Size
0.1 MB
Stars
19.7K
Updated
CommitJan 16
Age
14y
Commits · 90 Days