zDOOM v1.11
---------------------------
06 Mar 1998 (first release)

Randy Heit (rheit@usa.net)


Contents

1. Introduction
2. Features
 2-1. Looking up and down
3. Command Line Arguments
4. The Console
5. Key Bindings
6. Playing a Network Game
7. The Future
8. Known Bugs
9. Credits


1. Introduction
===============

zDoom is my own port of the official Doom source code to Win32. Yes, I realize 
that Andy Bay, Bruce Lewis, and Petteri Kangaslampi have already released their 
own ports for Win32, and there are also several others for MS-DOS. The reason 
I'm releasing this one is because I worked on it and like it best. :-) (Although 
I don't like the name zDoom. Anybody have any good ideas for a different name?)

To use it, just plop it in your existing Doom directory. (You must already have 
an existing copy of Doom to use this program.) If nothing else, you need to 
download the shareware Doom which is available in several places on the Net. A 
better idea would be to go out and buy the full game. The Depths of Doom Trilogy 
can be had fairly cheaply and includes Ultimate Doom, Doom II, and The Master 
Levels for Doom II.

ZDoom may be used and distributed free of charge. No profit may be made from the 
sale of it. These are terms set forth by both the Doom Source Code license and 
the MIDAS Digital Audio System license.


2. Features
===========

* Works under both Windows 95 and NT 4.0, although it works best under 
  Win95. I'm not sure why.
* Limited support for the Pause key. It works with some keyboards on some 
  machines.
* Supports any resolution compatible with your DirectDraw drivers.
* Look up/down similar ala Heretic.
* Translucency for selected objects.
* Has a console with most of the functionality of Quake's. The only significant 
  missing feature is Tab-completion.
* Notarget cheat.
* Command to kill all monsters in a level or yourself.
* Can play MUS, MIDI, and MOD music.
* Selected sounds are played in surround sound.
* Doors that need keys to open are highlighted on the automap.
* Automap now shows various statistics in addition to the level name.
* True keybindings. Bind any key to any command or sequence of commands.
* Intermission screen can now display your stats using absolute values 
  rather than percentages.
* A new more general demo format.

That's all I could think of right now. There are probably more.

2-1. Looking Up and Down
========================
By default, the commands related to looking up and down are not bound to
any keys. If you want to use them, you will have to bind them yourself using
the console. See below about key bindings. The commands related to looking
up and down are:

+mlook		Allows looking up and down with the mouse
+klook		Allows looking up and down with the keyboard
+lookup		Look up
+lookdown	Look down
centerview	Look straight ahead

A nice key configuration menu will be coming in the next release of zDoom.


3. Command line arguments
=========================

Most command line arguments are the same as those from the original Doom, and 
you should refer to the documentation that came with it for those. Only the 
arguments new to zDoom will be listed here.

-notrans
Disables all translucency. On slower machines, this can also result in a slight 
speed-up when starting, since the translucency table doesn't need to be 
calculated.

-width <xxx> -height <yyy>
Specifies the desired resolution of the screen. If only one is specified, zDoom 
will try to guess the other one based on a standard aspect ratio. If the 
specified resolution is not supported by your DirectDraw drivers, zDoom will try 
various resolutions until it either finds one that works or gives up. To 
determine which resolutions zDoom can use, use the vid_describemodes command 
from the console once you have started the game.

-nosound
Disables sound effects. Untested, but presumed to work.

-wavonly
Forces MIDAS to use the Windows wave device for sound instead of DirectSound.

-primarysound
Forces MIDAS to use DirectSound's primary buffer for sound mixing. Can lower 
latency but can possibly introduce other problems.

-iwad <file.wad>
The IWAD file specified after this parameter will be used as the game IWAD file 
instead of the default one.

-net
Starts a network game. This is the same as WinDoom and the original Linux doom. 
See below about network games for more details.


4. The Console
==============

zDoom has a console very similar to Quake's. To activate it, use the 
toggleconsole command. This is bound to the ` key by default but can be bound to 
any other key as well. For a complete list of console commands and cvars, see 
the commands.txt file.

Note that unlike WinDoom, cvars are actual "console variables" just as they are 
in Quake2. Why WinDoom refers to game commands as cvars, I don't know.


5. Key bindings
===============

zDoom now supports Quake-style controls as opposed to those of the original 
Doom. To bind a command to a key, use the bind command followed by the key to 
bind and the command(s) to bind to it. Multiple commands should be separated by 
semicolons (;) and if there are any spaces in the commands, they need to be 
enclosed in quotation marks (").

For example, to make the Page Up key cause the player to look up, use the 
command:

bind pgup +lookup

From now on, pressing Page Up will cause you to look up. Since this is also an 
action command (it begins with a '+'), releasing Page Up will also execute the -
lookup command, which will cause you to stop looking up.

You can also refer to keys by scancodes instead of names. For instance,

bind #3 "echo I don't like my pistol."

and

bind 2 "echo I don't like my pistol."

will both do the same thing, since 3 is the scancode for the "2" key.

All key bindings are automatically saved in the config.cfg file when the game 
quits.

The following special keys as well as the alphanumeric keys are named and can be 
bound:

backspace
tab
enter
ctrl
shift
kp*		* on the numeric keypad
alt		Either the left or right Alt key
space
capslock
numlock
scroll		Scroll Lock
kp7		7 on the numeric keypad
kp8		8 on the numeric keypad
kp9		9 on the numeric keypad
kp-		- on the numeric keypad
kp4		4 on the numeric keypad
kp5		5 on the numeric keypad
kp6		6 on the numeric keypad
kp+		+ on the numeric keypad
kp1		1 on the numeric keypad
kp2		2 on the numeric keypad
kp3		3 on the numeric keypad
kp0		0 on the numeric keypad
kp.		. on the numeric keypad
kana
convert
noconvert
yen
kp=		= on some numeric keypads
circumflex
kanji
stop
ax
unlabeled
kp,		, on some numeric keypads
kp/		/ on the numeric keypad
sysrq
home
uparrow
pgup
leftarrow
rightarrow
end
downarrow
pgdn
ins
del
lwin		The left Windows key
rwin		The right Windows key
apps		The application menu key
pause		Pause (only limited support at this time)
mouse1		The left mouse button
mouse2		The right mouse button
mouse3		The middle mouse button
mouse4		A fourth mouse button for any mice that actually have one.
joy1 - joy32	All 32 joystick buttons supported by Windows.

Note that i_remapkeypad must be "0" for kp0, kp., kp1, kp2, kp3, kp4, kp6, kp7, 
kp8, and kp9 to be treated as distinct keys.


6. Playing a Network Game
=========================

It took me quite awhile to get networking to work, but it seems to be functional 
now. I have not had time or the opportunity to thoroughly test it, though. 
(Nobody around here want's to play a netgame with me. :-( )

Note that due to changes zDoom has made to the message format of network games, 
you will definitely not be able to play a network game between zDoom and another 
Doom port unless someone else makes those same changes. Since zDoom uses the 
TCP/IP protocol for networking, it is possible to play a game on the Internet, 
although it probably won't play very well on anything other than a LAN.

The following has been copied directly from the WinDoom documentation with only 
minor modifications, since it has very good instructions on starting a network 
game:

  The parameter to start a network game is "-net" (without the quotes).  You 
  then follow the -net command with the player number your machine is going to 
  be (1 to 4) and the IP addresses or hostnames of the OTHER systems you will 
  be playing with. The IP addresses MUST be preceded by a period ".". If you 
  leave off the leading period, the game will think that the IP address is a 
  hostname and try to resolve it into an IP address (and die on you).

  Sample command lines for two players would look like this:

  machine 1: (hostname: rimmer IP address: 192.168.1.5)
  zdoom -net 1 holly -deathmatch -nomonsters
  OR
  zdoom -net 1 .192.168.1.4 -deathmatch -nomonsters

  machine 2: (hostname: holly IP address: 192.168.1.4)
  zdoom -net 2 rimmer -deathmatch -nomonsters
  OR
  zdoom -net 2 .192.168.1.5 -deathmatch -nomonsters

  In order to use hostnames rather than IP addresses you must either have DNS 
  setup or have a valid hosts file.

  If you add a third or fourth machine to the game you need to add the IP 
  addresses of the OTHER machines to the command line on each machine. You do 
  not put your own machine's IP address on the command line.  You also do not 
  put how many machines are in the game after the -net command.  Only which 
  player, out of the 4, you are.

  The player numbers must be contiguous.  You can't have players 1,2 and 4.  
  Also, one player MUST be player 1. Player 1 is the KEY player and that 
  machine coordinates all the other systems.

  The number of players in the game is determined by how many IP addresses you 
  put on the command line plus your machine.

  The command line on the KEY player's machine in a four player game might look 
  like this:

  zdoom -net 1 .192.168.1.3 .192.168.1.4 .192.168.1.5 -deathmatch -nomonsters
  OR
  zdoom -net 1 cat holly rimmer -deathmatch -nomonsters

  The other player's command lines in the same game might look like this:

  zdoom -net 2 lister holly rimmer -deathmatch -nomonsters
  OR
  zdoom -net 2 .192.168.1.2 .192.168.1.4 .192.168.1.5 -deathmatch -nomonsters

  zdoom -net 3 lister cat rimmer -deathmatch -nomonsters
  OR
  zdoom -net 3 .192.168.1.2 .192.168.1.3 .192.168.1.5 -deathmatch -nomonsters

  zdoom -net 4 lister cat holly -deathmatch -nomonsters
  OR
  zdoom -net 4 .192.168.1.2 .192.168.1.3 .192.168.1.4 -deathmatch -nomonsters


7. The Future
=============
* Handle key doors in the automap better. (See Known Bugs below)
* Make the automap colors configurable.
* Rearrange the menus like Doom Legacy has done.
* Implement aim up/down.
* Redo the sky backdrops similar to Doom Legacy. (Look up at the sky, and you 
  should see what I mean.)
* Add more cvars for various features.
* Implement the action commands I have defined but are unused.
* Support PAK files as well as/instead of WAD files. WAD files will still be 
  supported, but I expect to eventually day switch the native format to PAK, 
  since it offers slightly more flexibility than WADs.
* Proper highcolor support. This includes allowing each texture or sprite to 
  have its own palette. This was actually one of the reasons I wanted to work 
  with the Doom source in the first place.
* Allow players to pick their colors and names in netgames.
* Allow more than 4 players in netgames. Unfortunately, I only have the 
  resources to test 2 player netgames.
* Possibly switch to DirectPlay to handle communications between machines in 
  netgames. Since zDoom is already incompatible with every other Doom, I don't 
  have anything to lose by such a switch and a few things to gain (such as 
  support for protocols other than TCP/IP).
* Allow players to enter and leave netgames at will. This will require a 
  significant amount of work, so it's not a very high priority.
* Remove various limits from the original Doom engine. Right now, I have 
  increased them, so they are less likely to show up, but they are still 
  there.
* Separate the game and graphics code into separate DLLs ala Quake2.
* Support DeHackEd patches.
* Proper 3D collision detection.
* Speed up some of the rendering loops using assembly.
* Implement simple compression of network packets as I have done with demos.
* Others I haven't yet thought of...


8. Known Bugs
=============

* Text insertion in the console does not work properly.
* Opening a key door that stays open removes the highlighting of the line used 
  in the automap.
* Keyboard control in NT 4.0 is sluggish, and the mouse is jerky. This may 
  just be a problem with NT that I can't easily get around, since the same 
  code works without any problems under 95.
* Demos from other versions of Doom can quickly get out of sync. I suspect 
  this is a Visual C++ bug, since the problem is worse with the release build 
  than it is with the debug build. It will, however, play it's own demos 
  properly, so I'm not really concerned about fixing this. If anyone else with 
  VC++ 5.0 can provide a fix for this, I will try and implement it, but I'm 
  not going to waste any more time personally on it.
* Individual files added with the -file argument will be stored with their 
  complete path name minus extension rather than just their base name. (i.e. 
  "-file \foo\this.jnk" will add a lump named "\foo\this" instead of "this".


9. Credits
==========
(in no particular order)

Doom was originally written by id Software and is still copyrighted by them. All 
I have done is make some changes to the source code that they generously 
released. If you like zDoom and are among the few who dont already own Doom, 
please go out and buy it. If you have problems with zDoom, please do *not* 
contact them, since they will not be able to help you and will probably get very 
upset if you ask them for help with it.

I have also used some of the functions from id's Quake2 source release in zDoom 
as well. Most of these are simple functions that just make my life easier as I 
add new features.

qmus2mid (C) 1995,96 Sebastien Bacquet (bacquet@iie.cnam.fr) was used to convert
MUS lumps to MIDIs, since Windows can't play MUS files. I got the source for this
from NTDOOM.

Keyboard, mouse, and joystick code is from Andy Bay's WinDoom port, although I
have touched it so much in same places that portions of it no longer resemble
his very much. I don't know where to get the latest version of his port, but you
can try his homepage: http://members.aol.com/imarvintpa.

The MIDAS Digital Audio System 1.1.2 is used for all sound effects and MOD music 
and is copyright 1996,1997 Housemarque Inc. The latest version can be found at 
http://www.s2.org/midas/.

Most of the sound code was taken from NTDOOM by Peterri Kangaslampi with a few 
modifications to support my needs. I also borrowed the assembly inner-loop for 
the DrawSpan function from it. The latest version can be found at 
http://www.s2.org/ntdoom/.

The instructions for starting a netgame are from WinDoom by Bruce Lewis, the 
latest version of which can be found at http://www.frag.com/doom/. I also used 
his MIDI code as an example to write my own.

Doom Legacy by Fab and Boris was used to provide some guidance as I worked on 
getting the look up/down and aspect ratio correction code working properly. It 
also gave me the idea to dim the background behind the menus. It can be found at 
http://student.ulb.ac.be/~bpereira/doom3.htm. 
