|
| 1 | +================ |
| 2 | += doomgeneric = |
| 3 | +================ |
| 4 | + |
| 5 | +To port DOOM easly, I made some changes to source code. |
| 6 | +Now, all you need to do is implement the functions in doomgeneric.h to port DOOM to a new system. |
| 7 | +doomgeneric_win.c is a Windows GDI port. It is also a good example for how to port doomgeneric. |
| 8 | +Sound is not supported for now. |
| 9 | + |
| 10 | +Original readme |
| 11 | +=============== |
| 12 | + |
| 13 | +Here it is, at long last. The DOOM source code is released for your |
| 14 | +non-profit use. You still need real DOOM data to work with this code. |
| 15 | +If you don't actually own a real copy of one of the DOOMs, you should |
| 16 | +still be able to find them at software stores. |
| 17 | + |
| 18 | +Many thanks to Bernd Kreimeier for taking the time to clean up the |
| 19 | +project and make sure that it actually works. Projects tends to rot if |
| 20 | +you leave it alone for a few years, and it takes effort for someone to |
| 21 | +deal with it again. |
| 22 | + |
| 23 | +The bad news: this code only compiles and runs on linux. We couldn't |
| 24 | +release the dos code because of a copyrighted sound library we used |
| 25 | +(wow, was that a mistake -- I write my own sound code now), and I |
| 26 | +honestly don't even know what happened to the port that microsoft did |
| 27 | +to windows. |
| 28 | + |
| 29 | +Still, the code is quite portable, and it should be straightforward to |
| 30 | +bring it up on just about any platform. |
| 31 | + |
| 32 | +I wrote this code a long, long time ago, and there are plenty of things |
| 33 | +that seem downright silly in retrospect (using polar coordinates for |
| 34 | +clipping comes to mind), but overall it should still be a usefull base |
| 35 | +to experiment and build on. |
| 36 | + |
| 37 | +The basic rendering concept -- horizontal and vertical lines of constant |
| 38 | +Z with fixed light shading per band was dead-on, but the implementation |
| 39 | +could be improved dramatically from the original code if it were |
| 40 | +revisited. The way the rendering proceded from walls to floors to |
| 41 | +sprites could be collapsed into a single front-to-back walk of the bsp |
| 42 | +tree to collect information, then draw all the contents of a subsector |
| 43 | +on the way back up the tree. It requires treating floors and ceilings |
| 44 | +as polygons, rather than just the gaps between walls, and it requires |
| 45 | +clipping sprite billboards into subsector fragments, but it would be |
| 46 | +The Right Thing. |
| 47 | + |
| 48 | +The movement and line of sight checking against the lines is one of the |
| 49 | +bigger misses that I look back on. It is messy code that had some |
| 50 | +failure cases, and there was a vastly simpler (and faster) solution |
| 51 | +sitting in front of my face. I used the BSP tree for rendering things, |
| 52 | +but I didn't realize at the time that it could also be used for |
| 53 | +environment testing. Replacing the line of sight test with a bsp line |
| 54 | +clip would be pretty easy. Sweeping volumes for movement gets a bit |
| 55 | +tougher, and touches on many of the challenges faced in quake / quake2 |
| 56 | +with edge bevels on polyhedrons. |
| 57 | + |
| 58 | +Some project ideas: |
| 59 | + |
| 60 | +Port it to your favorite operating system. |
| 61 | + |
| 62 | +Add some rendering features -- transparency, look up / down, slopes, |
| 63 | +etc. |
| 64 | + |
| 65 | +Add some game features -- weapons, jumping, ducking, flying, etc. |
| 66 | + |
| 67 | +Create a packet server based internet game. |
| 68 | + |
| 69 | +Create a client / server based internet game. |
| 70 | + |
| 71 | +Do a 3D accelerated version. On modern hardware (fast pentium + 3DFX) |
| 72 | +you probably wouldn't even need to be clever -- you could just draw the |
| 73 | +entire level and get reasonable speed. With a touch of effort, it should |
| 74 | +easily lock at 60 fps (well, there are some issues with DOOM's 35 hz |
| 75 | +timebase...). The biggest issues would probably be the non-power of two |
| 76 | +texture sizes and the walls composed of multiple textures. |
| 77 | + |
| 78 | + |
| 79 | +I don't have a real good guess at how many people are going to be |
| 80 | +playing with this, but if significant projects are undertaken, it would |
| 81 | +be cool to see a level of community cooperation. I know that most early |
| 82 | +projects are going to be rough hacks done in isolation, but I would be |
| 83 | +very pleased to see a coordinated 'net release of an improved, backwards |
| 84 | +compatable version of DOOM on multiple platforms next year. |
| 85 | + |
| 86 | +Have fun. |
| 87 | + |
| 88 | +John Carmack |
| 89 | +12-23-97 |
0 commit comments