ZDOOM v1.13
26 May 1998 (third release)

Randy Heit (rheit@usa.net)

ZDoom will have a website soon!
http://zdoom.notgod.com/


Contents

  1. Introduction
1-1. Whats new in 1.13?
1-2. Installing ZDoom

  2. Command line arguments

  3. Configuring ZDoom
3-1. The Configure Controls menu
3-2. Changing settings not found in a menu

  4. The Console
4-1. Activating the console
4-2. Using the console

  5. Key bindings

  6. Playing a network game

  7. Known bugs

  8. Credits


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

ZDoom is an enhanced port of the official DOOM source code to Win32. As such, it 
not only works with (and requires) Windows 95/NT 4.0, but it also adds new
features not found in the version published by id Software. 

As of this writing, I am aware of one other DOOM port for Win32 that is still 
being maintained. This is Bruce Lewis WinDoom. However, the only new feature it 
adds to DOOM is a console, and it does not work with Windows NT. DOOM Legacy, 
DOSDoom, and Boom are all very good enhanced ports for DOS, but in my opinion 
they share one very big shortcoming: They use Allegro for their sound support. 
Allegro doesnt recognize my sound card (a GUS PnP), so I cant get any sound 
from them.

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 the Doom Source Code license, the MIDAS
Digital Audio System license, and the Prometheus Truecolor license.


1-1. Whats new in 1.13?
========================

- Fixed some major bugs (that crashed the game) and other lesser bugs that were
  just annoying.
- 3-D collisions for walking under and standing on other things.
- The status bar can be scaled to the full width of the screen.
- The screen mode can be selected from a menu inside the game.
- ZDoom can run in a window on the desktop.
- Better DeHackEd support. Only a few text replacements are not supported.
  Everything else works (including monster infighting which I haven't seen
  in any other port).
- New features for level designers (see editing.txt for details):
    Specification of next and secret maps on a per-map basis.
    Specify sky texture on a per-map basis.
    Use any lump in a wad as music for a map.
    Give maps a custom name without using a DeHackEd patch.
    Maps can be named anything (not just E?M? or MAP??).
    Place any messages of any length between any two maps.
    Hexen-style fog (of any color).
    Ambient sounds--either point like Quake or global like Heretic and Hexen.
    Automatic use of DeHackEd patches in PWADs.
    No more tutti-frutti for short textures of certain heights.
    zdoom.wcf file for use with WadAuthor.
- Rocket jumping. (One very important note about this: You need to be *in the
  air* when your rocket explodes for rocket jumping to work. This is different
  from Quake, and I will probably rewrite it for the next release.)
- Dynamic palette flashes.
- Supports stretching skies for freelook.
- Larger freelook range.
- Added tab-completion to the console.
- zdoom.cfg is now the name of the default configuration file since Doom
  Legacy decided to start using config.cfg.
- French language support. (Set language cvar to "french".)
- Player obituaries.
- Unlimited ammo cheat (use g_unlimitedammo cvar).


And the major differences between ZDoom and regular Doom:

- Free look (look up/down).
- High resoulutions.
- Translucency.
- A console.
- Stealth monsters.
- MOD and MIDI support.
- Better mouse support.
- Limited TCP/IP networking.
- Quake-style key bindings.
- Jumping.
- Crosshairs.


1-2. Installing ZDoom
=====================

To use ZDoom, unzip both zdoom.exe and zdoom.wad into 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. To truly take advantage of ZDoom, though you need 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 REQUIRES an IWAD from a 1.9 version of Doom. If you have a lesser version,
you can find patches to upgrade your version at ftp.idsoftware.com.

ZDoom also requires Microsofts DirectX 3 or later. If you are using Windows 95, 
you can download the latest version from Microsofts website at 
http://www.microsoft.com/directx. If you are using Windows NT 4.0, it is 
included as part of Service Pack 3. (I dont know where to get this, but try 
searching Microsofts site.) 


2. 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.

-deh <patch.deh>
Loads and installs the specified DeHackEd patch. This must be a text patch; 
binary patches are not supported. (As far as I know, most patches are text 
patches so this shouldnt be too much of a problem.) Also, only patch format 6 
is known to be supported. Other formats may or may not work properly.

-gfixspr    \
-gfixflt    |
-gfixpat    |- Sprites-in-a-pwad bugfix (Thanks to Martin Howe)
-gfixsfp    |  See readme.sprites for more details.
-gignrot    |
-gfixall    /
See readme.sprites.

-heapsize <mb>
This is the size in megabytes of the zone memory managers heap. If set too low, 
problems will almost certainly arise. 6 megabytes is probably a reasonable 
minimum to use for this parameter, although ZDoom wont stop you from using 
something smaller like 0.5 megabytes.

-iwad <iwadfile.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 almost the same as WinDoom and the original Linux
doom. See below about network games for more details.

-noidle
Normally, ZDoom will switch to an idle priority class when its window is
inactive so that it doesn't slow other programs down. This parameter, prevents
ZDoom from doing this. Useful if you want to play a netgame with only one
computer, otherwise you're probably better off leaving it alone.

-nommx
Disables MMX support. If your processor doesnt have MMX instructions, MMX 
support is automatically disabled even if you dont specify this parameter. 
Currently, disabling MMX will make no difference in performance in most 
situations. Once high and truecolor modes are supported, MMX ought to have
more of an impact on performance. (Just how much remains to be seen.)

-nosound
Disables sound effects.

-notrans
Disables all translucency.

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

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

-width <xxx> -height <yyy>
Specifies the desired resolution of the screen. If only one of -width or -height 
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.

In addition to the above parameters, any console command can be included on the 
command line by preceding them with a +. If you wish to change a cvar in this 
manner, it is a *very* good idea to use the set command. This is because any set 
commands will be executed just after the config file is loaded, and all other 
commands are executed after every game subsystem has been initialized. For 
example, to turn on the framerate counter when you start ZDoom, use the command 
line:

zdoom +set vid_fps 1

instead of

zdoom +vid_fps 1

For a complete list of console commands and cvars, refer to the commands.txt 
file. If you want to get the most from ZDoom, I highly recommend at least
glancing at this file.


3. Configuring ZDoom
====================

Zdoom now includes a new options menu which can be used to set some of the 
games new options. A new control configuration menu is also included that can 
be used to easily assign some commands to different keys.


3-1. The Configure Controls menu
================================

This menu lists several controls and up to two keys assigned to that control. 
There may be more than two keys assigned to a control, but only two of them will 
be shown at a time. If there are no keys assigned to the given control, this 
will be indicated with ???.

To change the keys assigned to a control, use the up and down arrow keys to 
select the control you wish to change. To assign a new key to the control, press 
Enter and then the key you want to activate this control. If you decide you 
dont want to assign a new key to the control, press Escape. To remove all keys 
for the selected control, press Space instead of Enter.

To return to the Options menu, press Backspace.

This menu only lists a select few commands, but they are the ones that are most 
likely to be used during gameplay. To assign other commands to keys, you can use 
the bind command from the console.


3-2. The Video Modes menu
=========================

The video modes menu can be used to select the current display mode and switch
between windowed mode and full screen. This menu can be found as a selection
inside the Options menu. Note that this screen will let you choose non-8 bit
modes. I am currently working on true color support, but decided to release
this version of ZDoom before I had finished it.


3-3. Changing settings not found in a menu
==========================================

There are many settings (cvars) that arent listed in any menu. To change these 
you need to use the console (see section 4). For a complete list of these, refer 
to the commands.txt file.

Two important cvars that arent listed in a menu are am_usecustomcolors and 
autoaim. If you prefer the original Doom automap colors, you can use them 
instead of the new ones used by ZDoom by typing "am_usecustomcolors 0" in the 
console. If am_usecustomcolors is "1", you can also change the automap colors by 
setting the appropriate cvar. These all begin with "am_", so you can find them 
listed together in the commands.txt file. (Sorry, there is no menu for this 
yet.)

The autoaim cvar controls autoaiming. The larger the value of autoaim, the 
further your aim can be from an enemy vertically, and you will still hit it. A 
value of "20" will be sufficient to produce the original DOOM behavior of 
shooting anything whether youre aiming directly at it or not. Setting this to 
"0" will disable autoaiming entirely. The default value for this cvar is "5". 
**WARNING** Currently, everyone in a netgame must have autoaim set to the same 
value, or the game is likely to get out of sync. This should be fixed in the 
next release of ZDoom.


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

ZDoom has a console very similar to Quake's. Almost all game settings and 
controls can be accessed from it. For a complete list of console commands and 
cvars, see the commands.txt file.


4-1. Activating the console
===========================

There are two ways to activate the console: From the Options menu, and with the 
toggleconsole command. The console can always be activated by selecting "Go to 
console" from the Options menu. While playing a game, pressing a key bound to 
the toggleconsole command can also activate the console. By default, this is the 
` key, but it can be changed to any key.


4-2. Using the console
======================

Using the console is fairly. Just type in commands and press Enter to execute 
them. To scroll around in the consoles text buffer, you can use the Page Up and 
Page Down keys. Pressing Shift-Page Up scrolls to the top of the buffer, while 
pressing Shift-Page Down scrolls to the bottom. Without pressing Shift, these 
keys will scroll one line at a time in the corresponding direction.

A handy feature of the console that was added in 1.13 is tab-completion. To use
it, begin typing a command, and then press tab repeatedy to cycle through all
the commands that begin with whatever you typed.

To deactivate the console, you can press either ` or Escape. This will also 
erase any text you might have been typing at the time.


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. These are the same keys displayed in the Configure Controls menu:

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
=========================

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.

To begin a network game, start ZDoom with the "-net" command-line parameter.
This is *different* from the DOS version of Doom. The -net parameter takes
the form:

    -net <console> [machine1] [machine2] ...

<console> is the player number that your machine is playing as (1 to 4)
and is followed by the addresses of the other machines in the network game.
These addresses can be either IP addresses like 192.168.1.5 or hostnames
like some.machine.com. To specify an alternate port to connect to on the
other machines, append a colon to the address and follow it with the port
you wish to use (i.e. some.machine.com:26000).

The number of players in a netgame is determined by the number of machines
after <console> in the -net parameter. For a two-player game, you would only
list one other machine. For a four-player game, you would list three.

Each player must choose a different console number. One person *must* be
console 1, and there can be no gaps between console numbers. For instance,
in a two-player game it's okay for one player to be console 1 and the other
to be console 2, but it's not okay if one player is console 1 and the other
is console 4.

An example for a two-player game:

    One machine named joe runs:		zdoom -net 1 bob -deathmatch
    The other machine named bob runs:	zdoom -net 2 joe -deathmatch

It's also possible to start a network game on your own machine if you run
ZDoom in a window with the -nomusic parameter:

    Start the first copy of zdoom:	zdoom -net 1 localhost:26000 -port 26001 -noidle
    Then start the second copy:		zdoom -net 2 localhost:26001 -port 26000 -noidle

This works much nicer under Windows NT than it does under 95.


7. Known Bugs
=============

* Opening a key door that stays open removes the highlighting of the line used 
  in the automap. This is not really a bug, just an unimplemented feature.
* 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.

If you find another bug with ZDoom, first try and duplicate it. If you can't
duplicate it, it's probably either a problem with your system or something
that I won't be able to fix unless I stumble on it. (I actually did find an
obscure bug this way!) If you can duplicate the problem, run the game in a
window, and send me the contents of the dialog box that pops up when it dies.
If you have Drwatson (included in the \windows\system directory of Windows
95B and 98), also run that and send me a copy of the log file it generates.
Also describe what you were doing when the problem occured and list any
PWADs you were using at the time.


8. 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 directly. 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/.

A tweaked version of PTC 0.72 (Prometheus Truecolor) was used for video support.
Its homepage is at http://www.gaffer.org/ptc.

Some 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/.

Andy Baker developed the code for the stealth monsters. His homepage is at 
http://website.lineone.net/~acbaker and his e-mail address is 
acbaker@lineone.net. He is also the current leader of the DOSDoom project.

DeHackEd was written by Greg Lewis, and its source code was used to get the 
DeHackEd support working properly.

The sprites, flats, and patches fix was written by Martin Howe and borrowed from
DOSDoom.

The MIDI code Bruce Lewis' WinDoom was used as a model for writing my own. 
The WinDoom and glDoom homepage is at http://www.frag.com/doom/.

DOSDoom was used for some ideas, although very little code was actually borrowed 
from it. Its homepage is at http://www.frag.com/dosdoom/.

Martin Howe's wad combining code from DOSDoom 0.60 is also used in ZDoom.

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
can be found at http://www.frag.com/doomlegacy/. 
