Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 Dec 1997 12:30:33 -0800
From:      Amancio Hasty <hasty@rah.star-gate.com>
To:        multimedia@FreeBSD.ORG
Cc:        hackers@FreeBSD.ORG
Subject:   doom source available 8)
Message-ID:  <199712272030.MAA00361@rah.star-gate.com>

next in thread | raw e-mail | index | archive | help

What a cool Christmas gift!
----------------------------

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.

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


------- Forwarded Message

Return-Path: pjchilds@al.imforei.apana.org.au
Received: from al.imforei.apana.org.au (pjchilds@al.imforei.apana.org.au 
[202.12.89.41])
          by rah.star-gate.com (8.8.8/8.8.8) with ESMTP id FAA03673
          for <hasty@rah.star-gate.com>; Sat, 27 Dec 1997 05:20:43 -0800 (PST)
          (envelope-from pjchilds@al.imforei.apana.org.au)
Received: (from pjchilds@localhost) by al.imforei.apana.org.au (beBop) id 
XAA19670; Sat, 27 Dec 1997 23:49:38 +1030 (CST)
Message-ID: <19971227234938.34089@imforei.apana.org.au>
Date: Sat, 27 Dec 1997 23:49:38 +1030
From: Peter Childs <pjchilds@imforei.apana.org.au>
To: sa-feeds@sa.apana.org.au
Cc: apana.sa.ftp@sa.apana.org.au, mike@smith.net.au, hasty@rah.star-gate.com
Subject: native xdoom for freebsd!
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Mailer: Mutt 0.76


 Gday..

  Since I scored Quake II for christmas i've been having a look at some
 of the work that some of the u*nx freaks are doing with quake etc...

  Anyway, the interesting thing that showed up was that the doom source
 code was released just before christmas!  

  So for freebsd'ers that don't want to have to modload linux emulation
 there is a native port (and the sndserver's music works!! -- something
 that was very touch-and-go with freebsd's linux compat & sound) at

  ftp://ftp.imforei.apana.org.au/pub/freebsd/misc/freebsd22-doom-engine.tgz

 (the source is on ftp.idsoftware.com ( /idstuff/source i think.. ))

  You'll need to throw a "wad" file in there (you can get them from the
 shareware version of doom) and make sure that sndserver is in the
 path... then away you go!  YMMV as its pretty well build as it came from
 the box (or tgz.. *grin*)

 Another interesting thing that Martin Bull brought to my attention is a
 bit of software called "bochs" which is a fully software based x86 
 emulator..  so far i've had it boot a DOS 6.22 image, and run Win95's
 setup proggy...  all in a window under X (gosh is it _slow_)

  ftp://ftp.imforei.apana.org.au/pub/freebsd/distfiles/bochs-971216b.tar.gz

 The project guys here are talking about booting linux, booting NT,
 etc.. and porting it all to java (imaging Office97 running on a
 "virtual" 386 on a NC!)

 I'll post some screenshots if I ever make it all the way through the
 setup (didn't have my 3.11 disk "image" on hand the first time .. dolt!)

 Regards,
  Peter


------- End of Forwarded Message






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199712272030.MAA00361>