home *** CD-ROM | disk | FTP | other *** search
/ MegaDoom Add-On 3 / MEGADOOM3.iso / other / doomhelp / linuxdm.hlp < prev    next >
Text File  |  1994-11-22  |  36KB  |  732 lines

  1.  
  2. Note: infant2 no longer has any Doom files. The Doom archive has
  3. temporarily moved to ftp.orst.edu until a more permanent home can be found.
  4. The directory on this temporary site is still pub/doom.
  5.  
  6. --
  7.  
  8. [Note: This latest edition has been automatically formatted (with
  9. some minor hand editing) from the new! HTML version.  If you
  10. have a World Wide Web browser, open URL:
  11. http://jcomm.uoregon.edu/~stevev/Linux-DOOM-FAQ.html
  12. for the fancy hypertext version (including a few gratuitous
  13. screen shots).  If you don't, you'll notice this version looks
  14. somewhat different from the last version.]
  15.  
  16. Linux DOOM FAQ
  17.  
  18. (revision 4, 94/10/28 -- now in HTML!)
  19.  
  20. Compiled by Steve VanDevender (stevev@efn.org)
  21.  
  22.       1. Introduction
  23.           1) What's DOOM?
  24.           2) This document
  25.  
  26.       2. Where to get Linux DOOM and DOOM add-ons
  27.       3. Prerequisites and installation
  28.           1) Compatibility requirements
  29.           2) Installation instructions
  30.  
  31.       4. Problems and solutions
  32.           1) DISPLAY=(null)
  33.           2) ioctl(dsp, ...) == -1
  34.           3) Could not get shared memory
  35.           4) Error: Game mode indeterminate
  36.           5) R_TextureNumForName: SW1BLUE not found
  37.           6) Cannot find STBAR; Demo is from different version
  38.           7) Sounds are missing or garbled
  39.           8) Some (or all) keyboard commands don't work
  40.           9) Pixel doubling/tripling options look funny
  41.          10) DOOMWADDIR doesn't work as advertised
  42.          11) The colors are totally bogus
  43.          12) I have an 8-bit soundcard, how can I get sound?
  44.          13) Segmentation fault during startup
  45.          14) Other known problems (not all solvable)
  46.  
  47.       5. Configuration, tweaks and tricks
  48.           1) The .doomrc file
  49.           2) Linux-specific command-line switches
  50.           3) Making lower-resolution X video modes
  51.           4) Dealing with add-on WADs
  52.           5) DOOM editors
  53.  
  54.       6. Other sources of information
  55.  
  56. ------------------------------------------------------------------------------
  57.  
  58. 1. Introduction
  59.  
  60. 1.1) What's DOOM?
  61.  
  62. DOOM is a wildly popular action game developed by id Software where you, a
  63. trained space marine, have to fight your way through a series of increasingly
  64. hellish moonbases that have been invaded by demonic creatures.  It features
  65. stunning realtime texture-mapped 3-D graphics, chilling stereo sound effects,
  66. and frenetic gameplay.  You can also play DOOM in multi-player cooperative or
  67. Deathmatch games using modems, IPX networks, and TCP/IP networks.  id
  68. distributes a full-featured shareware version with the 9 levels of DOOM
  69. Episode 1, "Knee-deep in the Dead", and for a $40 registration fee you can buy
  70. two more episodes, "The Shores of Hell" and "Inferno".  A commercially
  71. distributed sequel, DOOM II: Hell on Earth, is being sold in stores.  DOOM
  72. enthusiasts have decoded the formats of DOOM resource files with the blessing
  73. and support of id's programmers and created literally hundreds of
  74. user-designed levels (often called WADs or PWADs) to supplement the 27 levels
  75. in the registered version of DOOM or the 32 levels in DOOM II (you must have
  76. the registered version of DOOM or DOOM II to use these add-on levels).
  77.  
  78. Although primarily marketed for MS-DOS, DOOM was originally developed on NeXT
  79. systems and has been or will be ported to SGI systems, Macintoshes, the Atari
  80. Jaguar, MS-Windows, and more.  Now, a Linux port done by David Taylor of id is
  81. available that runs with Linux and XFree86.
  82.  
  83. 1.2) This document
  84.  
  85. I have compiled this document from my own experiences and information other
  86. people have posted on the net.  Whenever I remembered to, I have credited
  87. sources of information.  If I missed crediting you, I'm sorry.
  88.  
  89. This document is meant to provide information to help you install and use the
  90. Linux port of DOOM.  It does not attempt to answer questions about Linux or
  91. DOOM that are better answered by other sources, like how to recompile your
  92. Linux kernel or how to play DOOM.  References to some of these other sources
  93. are included.
  94.  
  95. Please feel free to send comments, changes, and additions to me
  96. (stevev@efn.org).  If I use them, I will try to credit you.
  97.  
  98. Since things change rapidly, sometimes pieces of this document will be
  99. out-of-date or just plain wrong.
  100.  
  101. When I am looking for more information on a subject or have a parenthetical
  102. comment, I will enclose it [in brackets].
  103.  
  104. ------------------------------------------------------------------------------
  105.  
  106. 2. Where to get Linux DOOM and DOOM add-ons
  107.  
  108. David Taylor has uploaded his releases of Linux DOOM to sunsite.unc.edu,
  109. directory /pub/Linux/games/x11/action/doom , in file linxdoom.tgz .  This is a
  110. gzipped tar file of the executables and a README with documentation for the
  111. game.  doom1wad.tgz is the shareware DOOM data file doom1.wad.  This directory
  112. contains other Linux-specific DOOM support files, like the 16-to-8-bit sound
  113. converter doom_16to8bit_snd.2.tgz .  There are also a couple of joystick
  114. drivers, joystick4doom.tgz and smooth-joystick4doom.tgz .  I haven't tried
  115. other of these, so you'll have to figure out which one works better for you.
  116.  
  117. An HTML-formatted current index of the files in sunsite's Linux DOOM directory
  118. is available in
  119. ftp://sunsite.unc.edu/pub/Linux/games/x11/action/doom/INDEX.html .
  120.  
  121. infant2.sphs.indiana.edu is probably the biggest DOOM FTP site.  However,
  122. because of a space shortage, for the time being they have Linux DOOM have been
  123. moved to a different machine, mimosa.astro.indiana.edu, in directory
  124. pub/doom/id/LINUX [note: as of this writing, the linxdoom.tgz there does not
  125. have the DOOMWADDIR fix].  This is also one of the best sites for getting
  126. add-on WAD files and the Linux version of DEU, one of the most popular DOOM
  127. editors.  The WAD archives and other DOOM add-ons are still available there in
  128. pub/doom .
  129.  
  130. However, infant2 is frequently spammed to the limit with other DOOM fanatics,
  131. and you may want to go to a site that's topologically closer to you, so here
  132. are several sites that mirror infant2.  Here's a list of DOOM FTP sites
  133. recently posted to alt.games.doom.announce:
  134.  
  135.     o ftp.uwp.edu, pub/msdos/games/id/home-brew/doom/
  136.     o ftp.orst.edu, pub/gaming/doom/
  137.     o ftp.uni-erlangen.de, pub/pc/msdos/games/ID/DOOM-stuff/
  138.     o aurora.bld189.jccbi.gov, /infant2
  139.     o nctuccca.edu.tw, /PC/games/DOOM/
  140.     o ftp.cdrom.com, pub/doom/
  141.     o ftp.luth.se, pub/misc/games/doom/
  142.     o ftp.demon.co.uk, pub/ibmpc/games/id/
  143.     o ftp.sun.ac.za, pub/msdos/doom/
  144.     o ftp.sunet.se, pub/doom/
  145.  
  146. ftp.uwp.edu is id's official FTP site; their files are in directory
  147. pub/games/id.  The latest updates to MS-DOS DOOM appear there first (but
  148. probably propogate to infant2 and mirror sites quickly and could be more
  149. accessible there).
  150.  
  151. Jan Sandorf (jsf@krynn.solace.mg.se) has put Linux DOOM up for FTP in Europe
  152. at ftp.solace.mh.se, directory pub/Linux/games/, in file linux-doom.tar.gz .
  153.  
  154. If you want to buy the registered copy of DOOM for MS-DOS (which you would
  155. have to do to legally obtain the registered doom.wad file), call 1-800-IDGAMES
  156. [North America only; I'd like to know the number for international callers to
  157. use.] The cost is $40 plus (approximately) $6 shipping, charged to a major
  158. credit card.  Delivery time is usually around a couple of weeks.
  159.  
  160. ------------------------------------------------------------------------------
  161.  
  162. 3. Prerequisites and installation
  163.  
  164. This section describes what you'll need to have to run DOOM under Linux.
  165.  
  166. 3.1) Compatibility requirements
  167.  
  168. To run DOOM under Linux, you will need:
  169.  
  170.     o Linux 1.0 or above with SYSV IPC enabled
  171.     o XFree86 2.0 or above (if you compiled it from source yourself, make
  172.       sure to have the MITSHM extension enabled)
  173.     o The Linux DOOM executables
  174.     o A doom*.wad file for version 1.666 of DOOM (which contains all of
  175.       the game data)
  176.  
  177. For best performance, you should have a 486-33 or better with at least 8M of
  178. memory and a VLB or PCI-bus video card (although many people are getting good
  179. results with high-quality ISA-bus video cards as well).  There are quite a few
  180. variables that affect DOOM performance; some people find it unplayable on
  181. otherwise spiffy-looking systems and some 386-40 users think it's perfectly
  182. playable on their systems.
  183.  
  184. In addition, if you want sound effects, you will need:
  185.  
  186.     o The Linux sound driver (Voxware) 2.90 or above (cat /dev/sndstat to
  187.       find out your version)
  188.     o A 16-bit soundcard (such as the Sound Blaster 16, Pro Audio Spectrum
  189.       16, or Gravis Ultrasound).  You may be able to get your 8-bit
  190.       soundcard to work with the package doom_16to8bit_snd.tgz -- see the
  191.       section titled "I have an 8-bit soundcard, how can I get sound?".
  192.  
  193. Here's the output of ldd (which gives dynamic linking information for
  194. executables) for linuxxoom and sndserver.  If your shared libraries are older
  195. than these versions and you're having problems, you may want to consider
  196. upgrading them.
  197.  
  198. $ ldd linuxxdoom
  199.         libXt.so.3 (DLL Jump 3.1) => /usr/X386/lib/libXt.so.3.1.0
  200.         libX11.so.3 (DLL Jump 3.1) => /usr/X386/lib/libX11.so.3.1.0
  201.         libc.so.4 (DLL Jump 4.5pl26) => /lib/libc.so.4.5.26
  202. $ ldd sndserver
  203.         libm.so.4 (DLL Jump 4.5pl26) => /lib/libm.so.4.5.26
  204.         libc.so.4 (DLL Jump 4.5pl26) => /lib/libc.so.4.5.26
  205.  
  206. 3.2) Installation instructions
  207.  
  208. Obtain the file linxdoom.tgz from one of the FTP sites listed above.  If you
  209. don't have MS-DOS DOOM, you can get the shareware doom1.wad file, probably in
  210. the same place, in the file doom1wad.tgz.  If you have DOOM for MS-DOS, then
  211. you can use doom1.wad from the shareware version, doom.wad from the registered
  212. version, or doom2.wad from DOOM II.
  213.  
  214. The simplest installation is to extract linxdoom.tgz into a directory and
  215. place the doom*.wad file of your choice in that same directory.  You have to
  216. be running the X server before you can start DOOM.  If you have met all of the
  217. prerequisites above, then just run linuxxdoom and have a Hell of a good time!
  218.  
  219. If you don't have the appropriate sound card or sound driver available, rename
  220. or delete the program "sndserver" to disable sound effects.  Many respondents
  221. say that not running sndserver also speeds up the frame rate significantly.
  222.  
  223. If you would like to install the binaries in one directory and keep the
  224. doom*.wad file in another, you can set the DOOMWADDIR environment variable to
  225. the name of the directory where you are keeping doom*.wad so that linuxxdoom
  226. can findit.  You can also make a symbolic link to a copy of doom*.wad in a
  227. mounted MS-DOS filesystem if you don't want to duplicate doom*.wad into a
  228. Linux filesystem (although the game will start much faster if doom*.wad is in
  229. an ext2 filesystem).  If you can't get DOOMWADDIR to work, see the section
  230. titled "DOOMWADDIR doesn't work as advertised" below.
  231.  
  232. H. Peter Anvin  has written a shell script that acts as
  233. a front-end for Linux DOOM as part of a package including the DOOM executables
  234. and the sndcvt program for 8-bit sound support.  The package is available by
  235. anonymous FTP from eecs.nwu.edu in pub/linux/doom/doom.tgz .  The script
  236. installs into /usr/local/bin and runs DOOM from /usr/local/lib/doom.
  237.  
  238. Read the README.linux included in linxdoom.tgz.  It contains most of the
  239. information here (in briefer form), complete documentation of the game
  240. commands and gameplay features, and also explains id's policy towards the
  241. Linux port -- it exists because "Linux gives [David Taylor] a woody" and is
  242. not officially supported by id.  Linux DOOM does not support all MS-DOS doom
  243. features (notably music, mouse control, and modem or IPX network play) and
  244. probably never will add the missing ones.
  245.  
  246. For additional configuration options, see the section titled "Configuration,
  247. Tweaks, and Tricks".
  248.  
  249. ------------------------------------------------------------------------------
  250.  
  251. 4. Problems and solutions
  252.  
  253. Most of the headers in this section contain key words from an error message
  254. output by DOOM when something doesn't work.
  255.  
  256. 4.1) DISPLAY=(null)
  257.  
  258. This means you are trying to run DOOM without X. You need to start your X
  259. server before you can start DOOM.  If you try to set the environment variable
  260. DISPLAY without having an X server running, or the variable is set wrongly,
  261. then instead you'll probably get a message containing "Cannot connect to
  262. server".
  263.  
  264. If you have to install X, you will need to install the SVGA version of X or
  265. one of the versions tailored for various accelerated graphics chipsets, and
  266. run the display in 256-color mode (not monochrome or 16-color mode, or the 16-
  267. or 32-bit color modes available in XFree86 3.1).  DOOM will not work with a
  268. display whose color depth is anything other than 8 bits.
  269.  
  270. 4.2) ioctl(dsp, ...) == -1
  271.  
  272. These messages from the sndserver program indicate that you don't have the
  273. 2.90 version of the Linux soundcard driver installed (if you have a soundcard
  274. and the sound driver enabled at all).  The latest Linux DOOM release says you
  275. need the 3.0 drivers; I'm still running 2.90 and everything seems to be
  276. working OK.
  277.  
  278. The reason you need the more recent driver is that Hannu Savolainen (the sound
  279. driver author) included changes to the driver provided by David Taylor to
  280. support real-time sound effects.  Without the new driver, you will get delayed
  281. sounds, garbled sounds, or no sound at all.
  282.  
  283. You can get the latest Linux soundcard driver from sunsite.unc.edu, in the
  284. directory pub/Linux/kernel/sound, in file snd-driv-2.90.tar.gz.  Two patches,
  285. snd-driv-2.90.patch1.gz and snd-driv-2.90.patch2.gz , are also available
  286. there, so you should probably get them.  The snd-driv-2.90.tar.gz file is
  287. meant to replace the drivers/sound directory tree in the 1.0 Linux kernel
  288. source.  You will have to compile the kernel with the new, correctly
  289. configured sound driver, install the kernel, and boot from it before DOOM
  290. sound effects will work correctly.
  291.  
  292. If you get messages like "Could not find lumpname: [something]" then that
  293. means you don't have DOOM II yet.  These messages are harmless and occur
  294. normally; they just mean that sndserver can't find sound files specific to
  295. DOOM II.
  296.  
  297. 4.3) Could not get shared memory
  298.  
  299. Even if you have the current sound driver, you may need to recompile your
  300. kernel anyway to enable SYSV IPC, which includes shared memory (that is, the
  301. ability for multiple processes to share a common region of physical memory
  302. between them).  Linux DOOM uses a display buffer shared between the DOOM
  303. process and the X server to greatly speed up the process of drawing your DOOM
  304. display; without shared memory DOOM would have to transmit a 64K bitmap
  305. through a UNIX socket for every frame and would not perform well at all.
  306.  
  307. The question about whether to include SYSV IPC is in the first round of
  308. questions asked when you run "make config" in the Linux kernel source
  309. directory.
  310.  
  311. 4.4) Error: Game mode indeterminate
  312.  
  313. DOOM is looking for the doom*.wad file that it needs.  This could mean that
  314. you haven't installed a doom*.wad file or that you have an incorrect setting
  315. for the DOOMWADDIR environment variable that DOOM uses to locate doom*.wad.
  316.  
  317. The name of the WAD file is significant and is used to determine what mode the
  318. game should run in, like this:
  319.  
  320.     o doom1.wad
  321.       Run in shareware mode (no -file switch, only the first episode is
  322.       available)
  323.     o doom.wad
  324.       Run in registered mode (-file switch works, three episodes
  325.       available)
  326.     o doom2.wad
  327.       Run in DOOM II mode (-file switch works, one episode of 32 levels)
  328.  
  329. 4.5) R_TextureNumForName: SW1BLUE not found
  330.  
  331. You did something dumb and gave the WAD file the wrong name.  DOOM determines
  332. whether it should act like the shareware or registered version by the name of
  333. the WAD file.  The shareware wad (about 4.8 megs in size) is called doom1.wad,
  334. and the registered version (about 11 megs) is called doom.wad.  If you rename
  335. the shareware doom1.wad to doom.wad, DOOM will die when it can't find
  336. resources for the registered version in the shareware WAD.  If you rename the
  337. registered doom.wad to doom1.wad, then DOOM won't let you play the second or
  338. third episodes.
  339.  
  340. 4.6) Cannot find STBAR; Demo is from different version
  341.  
  342. These messages come up if your doom*.wad file is from a version of DOOM other
  343. than the latest one, 1.666.  You will need to patch your doom*.wad file to the
  344. latest version.  Unfortunately, you will have to install DOOM under MS-DOS and
  345. run DOS to do this, since the patch program runs under MS-DOS.  If you can't
  346. bring yourself to do this, get doom1wad.tgz with the shareware version of the
  347. 1.666 doom1.wad, or buy the MS-DOS registered DOOM and get a friend with DOS
  348. to patch it to 1.666 and give you the files.
  349.  
  350. If you are really desperate, try invoking doom with the "-warp" command-line
  351. option to jump directly into the game and skip the demos:
  352.  
  353. linuxxdoom -warp 1 1
  354.  
  355. 4.7) Sounds are missing or garbled
  356.  
  357. This could happen along with the message described in the section titled
  358. "ioctl(dsp,...)==-1" above.  If sounds are missing, but you have all the other
  359. prerequisites taken care of, make sure that sndserver is in your executable
  360. search path where DOOM can find it.
  361.  
  362. 4.8) Some (or all) keyboard commands don't work
  363.  
  364. If none of the advertised keyboard commands work, put the mouse pointer inside
  365. the DOOM window (or click on it if your window manager is set for
  366. click-to-type input focusing) so that it is the keyboard focus.
  367.  
  368. If just the SHIFT, CTRL, or ALT keys don't seem to work right in DOOM, this is
  369. the result of your X window manager wanting to grab certain keys for its
  370. functions.  fvwm and olwm/olvwm have default actions or modifiers bound to the
  371. SHIFT, ALT, and CTRL keys.  You can redefine DOOM's key command bindings (see
  372. the section titled "The .doomrc File"), turn off the window manager bindings
  373. for those keys (see your window manager man page), or use a different window
  374. manager (twm is commonly available and doesn't treat those keys specially).
  375.  
  376. 4.9) Pixel doubling/tripling options look funny
  377.  
  378. The very first released version of Linux DOOM had a bug with the -2, -3, and
  379. -4 command-line switches that scale the DOOM window size.  David Taylor says
  380. you're stupid to use them (they kill the frame rate) but ended up putting an
  381. updated linxdoom.tgz on sunsite a couple days after the first version was
  382. released that fixed the problem with -2 and -3.  Pixel quadrupling (the -4
  383. switch) is still broken, but you need a display bigger than 1280x1024 to use
  384. that anyway.  You really are best off not using -2, -3, or -4 to magnify the
  385. window.  You can use a lower-resolution video mode in X (section 5.3) to
  386. magnify the window and get maximum frame rate.
  387.  
  388. 4.10) DOOMWADDIR doesn't work as advertised
  389.  
  390. The originally released version of Linux DOOM had another bug -- the
  391. DOOMWADDIR environment variable couldn't be used to locate the doom*.wad file
  392. in a directory other than the current one.  This has been fixed in the most
  393. recent release (94/9/13).
  394.  
  395. 4.11) The colors are totally bogus
  396.  
  397. DOOM uses a local colormap in X because it needs all 256 colors.  Your mouse
  398. pointer must be inside the DOOM window for the DOOM colors to look right.  Of
  399. course, this makes the colors of the rest of your display look weird instead.
  400. DOOM also does palette tricks that may cause your entire screen to flash red,
  401. white, or green as it manipulates the colormap.
  402.  
  403. 4.12) I have an 8-bit soundcard, how can I get sound?
  404.  
  405. Harry C Pulley (hpulley@uoguelph.ca) writes:
  406.  
  407.      8 bit sound for DOOM:
  408.  
  409.      Charles  wrote a package called
  410.      doom_16to8bit_snd.tgz on sunsite.unc.edu in
  411.      /pub/Linux/Incoming.  It probably won't stay in that
  412.      directory and is probably available from other sites as
  413.      well.  This package allows users of non-SB16 cards to hear
  414.      the sound effects on their card.  It works by patching
  415.      sndserver to send the output to a pipe which sndcvt reads
  416.      and sends, in 8-bit format, to /dev/dsp.  Most cards which
  417.      have a 8-bit /dev/dsp device should work with this setup.
  418.  
  419.      Paraphrasing the readme file, you must run "sed
  420.      s,/dev/dsp,/tmp/dsp,g  sndserver.new"; then
  421.      replace sndserver with sndserver.new.  Next, run "mknod
  422.      /tmp/dsp p" to create a pipe for sndcvt.
  423.  
  424.      Now, to run doom with sound, run "sndcvt & linuxxdoom"
  425.      (optionally add a "&" to put the linuxxdoom in the
  426.      background).  sndcvt will automatically die when doom is
  427.      finished.
  428.  
  429.      The package includes a binary and source code.
  430.  
  431.      On my 486DX-33 with 8MB of RAM, VLB video and a clone 8-bit
  432.      SB card, this works great and I get good performance.  The
  433.      sound is slightly behind the action but I have heard users
  434.      with genuine SB16 cards complain about the same thing.  I
  435.      have never heard it on a SB16 so I can't tell you if there
  436.      is more delay or not.  I suspect that there might be more
  437.      delay due to pipe and context switch overhead.
  438.  
  439.      Note that you still only get sound effects; no background
  440.      music :-(
  441.  
  442. 4.13) Segmentation fault during startup
  443.  
  444. David.Lecomber@comlab.oxford.ac.uk had this problem and said that upgrading
  445. his system's C and X11 shared libraries to the current versions got rid of it.
  446. See the section entitled "Compatibility Requirements" for full compatibility
  447. information.
  448.  
  449. 4.14) Other known problems (not all solvable)
  450.  
  451. The 1.666 registered doom.wad has a bug in E3M9 (Warrens) resulting from a
  452. bogus linedef in the level.  A binary patch for this has been discussed in
  453. alt.games.doom and if you know what I'm talking about here, then you can
  454. probably manage to apply it and may even want to.
  455.  
  456. Sound PWADs (WAD files that are intended to replace DOOM sound effects) don't
  457. seem to work with Linux DOOM.
  458.  
  459. You can't use the mouse for a control device.  Well, you can (see the section
  460. titled "Linux-specific command-line switches" ) but it doesn't work very well.
  461. This is one of the most frustrating things for me (I'm a die-hard mouse user
  462. because I find it the best all-around control for both speed and precision)
  463. but I can think of several programming reasons why it is very difficult to
  464. support under X.
  465.  
  466. David Taylor contributes this explanation about the lack of mouse support and
  467. music in Linux DOOM:
  468.  
  469.      Mouse:
  470.  
  471.      I'm going to go into this one because it's pretty frustrating, and
  472.      it would be nice if a sympathetic X coder took it to heart.  You
  473.      mentioned the grim -grabmouse thing.  That was one of several failed
  474.      attempts.  First off, the mouse cursor is pretty darn important in
  475.      X and other windowed environments.  If a process is misbehaving,
  476.      you drag the pointer elsewhere and kill it.  It's therefore considered
  477.      exteremely rude (and rightly so) to grab all the mouse input.
  478.  
  479.      Nonetheless, if you think about how mouse control works for DOOM,
  480.      this is what is required.  So assuming we're going to be rude, what
  481.      I need next is a way to get what are called "mickeys", the bare-bones
  482.      information sent from the mouse to the computer.  They're basically
  483.      a delta-x and delta-y movement pair that simply tell you how much
  484.      the mouse has moved.
  485.  
  486.      Unfortunately, X in its attempt to be nice to most normal apps,
  487.      does not give you this information.  Instead, it gives you the new
  488.      pointer position on the X server.  This causes several problems.
  489.      One is that it doesn't have to stream this information to you at
  490.      the rate the mouse is providing it.  It can simply collect up
  491.      several delta pairs and give you the resulting new position.  That
  492.      causes jerkiness.  But let's say for the sake of argument (and the
  493.      sake of -grabmouse) you sort of reverse this by taking the deltas
  494.      of what X is feeding you.
  495.  
  496.      What happens when you move the mouse to the left side of the window
  497.      and want to move your character left?  Nothing.  It registers as
  498.      zero movement even though you're moving your mouse.  You therefore
  499.      need to periodically warp the mouse pointer back to the center of
  500.      the window to keep it from getting near the edge.
  501.  
  502.      I think this is where the real trouble is coming from.  I believe
  503.      information is being lost in the warp.  A smooth drag to the left
  504.      has to be interrupted several times a second to keep it from getting
  505.      to the edge.  These interruptions appear as stutters in your
  506.      movement, and you get that not-too-nifty feel of -grabmouse.
  507.  
  508.      The thought of opening up ol' /dev/mouse even though the X server
  509.      is using it crossed my mind, but I didn't even try.  I wasn't
  510.      looking for trouble.
  511.  
  512.      But besides it being somewhat painful to implement, the thought
  513.      that everyone would have to play with the keyboard in deathmatches
  514.      appealed to be instantly.  I'm a fairly good keyboard player but
  515.      feel like a blind cripple against any decent mouse player.  I
  516.      know, I know.. power corrupts.. :)
  517.  
  518.      I should point out here that Hannu is not the only nice guy writing
  519.      code for Linux.  The author of svgalib, Harm Hanemaaijer, was trying
  520.      to sway me to write an svgalib version.  I said I didn't have time
  521.      and wanted to write one version for all high-end UNIX platforms
  522.      and that by the way, svgalib had no provision for portable mouse
  523.      measurements.  He promptly added that feature, and I hope other
  524.      games out there capitalize on it as I probably should have.  I am
  525.      the part owner of a small shareware game company on the side, and
  526.      if it's any comfort to him, they're writing an extremely high-quality
  527.      game which will be available for Linux with both X and svgalib
  528.      versions.  (sorry- no dates/details.  deadlines=stress.)
  529.  
  530.      Music:
  531.  
  532.      Because the existing code isn't ours and isn't terribly portable
  533.      in this case, it's a pain to do from scratch, and although missed,
  534.      it is not essential to the experience.  Bobby's gonna kill me for
  535.      saying that.
  536.  
  537. ------------------------------------------------------------------------------
  538.  
  539. 5. Configuration, tweaks, and tricks
  540.  
  541. 5.1) The .doomrc file
  542.  
  543. Your .doomrc file has a variety of customization options for DOOM.  The MS-DOS
  544. version calls the file default.cfg instead and has a SETUP utility that can
  545. change many of the important options.  Since you're a wizardly Linux user, you
  546. get to edit the file manually instead.  Some options are set within DOOM
  547. itself, and those won't be described here.
  548.  
  549. The file has a simple format: The first word on each line is a DOOM variable,
  550. and following it after some whitespace characters is that variable's value.
  551. If you don't have a .doomrc in your home directory when you first start DOOM,
  552. it will create one with default values.  Once you customize it, DOOM will keep
  553. those values.
  554.  
  555. A group of variables contains keycodes for DOOM keyboard commands.  These are:
  556.  
  557. key_right: turns you to the right key_left: turns you to the left key_up:
  558. moves you forward key_down: moves you backward key_strafeleft: moves you
  559. sideways to the left key_straferight: moves you sideways to the right
  560. key_fire: shoots or activates your current weapon key_use: activates doors,
  561. lifts, and switches key_strafe: when held down, key_right and key_left act
  562. like key_straferight and key_strafeleft key_speed: when held down, increases
  563. the rate of motion of all movement keys The number following each is a keycode
  564. for the desired key.  For most normal typing keys, this is the ASCII code of
  565. the character generated by the unshifted key, i.e.  the 'A' key has keycode 97
  566. (ASCII lowercase 'a').  I haven't figured out what the keycodes are for all of
  567. the non-typing keys, but those given in the default .doomrc are:
  568.  
  569. up-arrow 173 down-arrow 175 left-arrow 172 right-arrow 174 SHIFT 182 CTRL 157
  570. ALT 184 Note that your X window manager may interfere with the use of SHIFT,
  571. CTRL, or ALT (see section 4.7).  DOOM also has some non-configurable commands
  572. -- ESC to bring up the main menu, 1-7 to change weapons, F1-F10 for various
  573. options, TAB to toggle the automap.  You probably don't want to assign other
  574. commands to those keys, and you may also see your window manager override the
  575. function keys.
  576.  
  577. mb_used is a Linux-specific variable in .doomrc.  It controls the size of the
  578. heap used by DOOM for dynamic storage.  The approximate memory requirements of
  579. your DOOM process are 1.6+mb_used megabytes for DOOM itself, and another 1.6
  580. megabytes or so for sndserver.  mb_used is 2 by default.  If you have more
  581. memory, you may slightly reduce hesitations in the game caused by DOOM
  582. swapping resources in and out by setting it to a higher value (as long as this
  583. doesn't induce virtual-memory swapping in Linux itself); increasing it really
  584. has no consistent beneficial effect on overall frame rate in timing
  585. experiments that I've done, but I run with mb_used set to 4 anyway.
  586.  
  587. sndserver contains the pathname of the sndserver program, normally just
  588. "sndserver".
  589.  
  590. snd_channels controls the number of simultaneous sound effects that DOOM will
  591. try to play.  By default, it will play no more than 3 overlapping sound
  592. effects at once.  If you have a really nifty sound card that can handle it and
  593. don't mind a slight performance hit, you can set this to a higher value (I
  594. successfully use 8 with my Gravis Ultrasound).
  595.  
  596. If I haven't mentioned a .doomrc variable here, it's either because 1) you can
  597. control it from DOOM itself, 2) it's documented in the standard DOOM README,
  598. or 3) it's completely irrelevant in Linux DOOM.
  599.  
  600. 5.2) Linux-specific command-line switches
  601.  
  602. These command-line switches are (usually) specific to the Linux version (and
  603. maybe other UNIX/X versions).
  604.  
  605. -disp and -geom appear to be analogous to the standard X -display and
  606. -geometry command line options for specifying the X server to connect to and
  607. the initial window geometry.  -geom doesn't take the standard X geometry
  608. specification (WxH+X+Y) but instead takes two numeric arguments for the
  609. initial X and Y position of the window (which may be ignored by your window
  610. manager).
  611.  
  612. -2, -3, and -4 respectively double, triple, and quadruple the window size and
  613. pixel size of the DOOM window.  -4 doesn't currently work right (and probably
  614. never will).  -2 and -3 work but slow down your frame rate immensely.
  615.  
  616. -grabmouse is an undocumented switch that enables what is apparently an
  617. experimental mouse control mode for X. You probably won't like it at all, so
  618. be warned before you try it.  The frame rate goes way, way down when you use
  619. it, but other than that mouse controls seem to work like they do in DOS.  You
  620. may also have trouble if you use click-to-type keyboard focusing in your
  621. window manager, since you don't have any time to click on the window to set
  622. the keyboard focus before DOOM grabs your mouse.
  623.  
  624. The -net switch that controls network game play has a different syntax.  You
  625. follow it first with the node number your machine should use, and then list
  626. the domain names or IP addresses of the other machines in the net game.
  627.  
  628. Command-line switches not described here (there are lots) are covered in the
  629. standard DOOM documentation, which is in the README.linux file that comes with
  630. the Linux executables.
  631.  
  632. 5.3) Making lower-resolution X video modes
  633.  
  634. Because the -2 and -3 switches make your DOOM window readable at the expense
  635. of the game's frame rate, you will probably want to use a low-resolution video
  636. mode in XFree86 as a way of expanding the window to a readable size while
  637. keeping the game fast.
  638.  
  639. Unfortunately, many of the video mode definitions being thrown around the net
  640. are absolutely ludicrous.  They may work for their authors, but some have
  641. refresh rates so high that those authors may soon be found dead with charred
  642. bits of exploded monitor blasted into their steaming bodies.
  643.  
  644. If you want to avoid a toasted monitor and possible flaming horrible death,
  645. the safest thing to do is probably to just use a standard mode like 640x480
  646. that monitors are designed to handle.  If you try for a lower-resolution mode
  647. than that, make sure that you don't exceed your monitor's horizontal or
  648. vertical refresh rates.  Use as low of an SVGA dot clock as your card will
  649. support and be aware that 320x200 VGA uses some option bits in the VGA
  650. registers that double pixels horizontally and vertically -- you probably can't
  651. get a SVGA card to duplicate that mode without using those mode bits.
  652.  
  653. XFree86 3.1 has a generic 320x200 256-color VGA mode driver (use chipset
  654. "generic").  You might try that.
  655.  
  656. 5.4) Dealing with add-on WADs
  657.  
  658. Linux DOOM is perfectly happy with the supplementary WAD files that MS-DOS
  659. DOOMers have been playing for months, with the important exception that sound
  660. WADs don't seem to work at all (you can specify them, but no sound effects get
  661. replaced).  IMPORTANT: You must have the registered version of DOOM (with the
  662. 11 meg doom.wad) or DOOM II (with a 15 meg doom2.wad) to use the -file
  663. command-line option that loads add-on WADs.  Buy a copy of DOOM and join the
  664. fun.
  665.  
  666. One problem you may encounter is that older WAD files containing their own
  667. demos may cause DOOM to abort with the message "Error: Demo is from a
  668. different game version!".  This happens for MS-DOS-based DOOM players as well,
  669. and is because DOOM won't play demos from a different game version.  It
  670. probably doesn't mean that you can't play the WAD; it just means that you will
  671. have to use command-line options to start the level you want without going
  672. through the WAD's demos.  For example, to start cleim10.wad, which replaces
  673. all of episode 2, say something like:
  674.  
  675. linuxxdoom -file cleim10.wad -skill 4 -warp 2 1
  676.  
  677. This loads the replacement wad cleim10.wad, sets your difficulty level to
  678. ultra-violence, and "warps" to episode 2, level 1.
  679.  
  680. 5.5) DOOM editors
  681.  
  682. Your friends cursed with MS-DOS can run all kinds of DOOM map editors that let
  683. them modify levels or create their own, change the "thing tables" in DOOM.EXE,
  684. and otherwise have all kinds of fun.  So far, few of these exist for Linux.  I
  685. have heard of a port of the popular DEU editor that runs with svgalib under
  686. Linux, and rumors are that a later version will run under X. I would be
  687. interested in in hearing from authors of DOOM utilities who would be willing
  688. to release source code for porting them to Linux.  Please contact me
  689. (stevev@efn.org) if you would like to let me try porting your utility to
  690. Linux.
  691.  
  692. ------------------------------------------------------------------------------
  693.  
  694. 6. Other sources of information
  695.  
  696. You may have received this document as a news posting formatted from my HTML
  697. source.  If you would like to see this as a World Wide Web page, open the URL
  698. http://jcomm.uoregon.edu/~stevev/Linux-DOOM-FAQ.html.
  699.  
  700. I said this at least three times already, but read the file README.linux that
  701. comes with the binaries.  It's a note from David Taylor stuck on the top of
  702. the MS-DOS README file, so it's got what you need to know about the game and
  703. how to play it.
  704.  
  705. If you need to know how to recompile your Linux kernel, configure XFree86, or
  706. edit your own WADs, there are much better FAQs available than I can write.
  707.  
  708. For Linux and XFree86 configuration information, there are FAQs available by
  709. FTP and WWW from sunsite.unc.edu.  Start with the file
  710. pub/Linux/docs/HOWTO/META-FAQ or the Linux Documentation Project Home Page at
  711. URL http://sunsite.unc.edu/mdw/linux.html.
  712.  
  713. DOOM also has a large and detailed FAQ available from infant2.sphs.indiana.edu
  714. in directory pub/doom/text/ , file dmfaq58.txt .  Much of the information is
  715. tailored to MS-DOS specific problems with DOOM, but is probably the best
  716. general introduction to the game and its culture.
  717.  
  718. A DOOM WWW (World Wide Web) page, DoomGate , is available at URL
  719. http://www.cedar.buffalo.edu/~kapis-p/doom/DoomGate.html.
  720.  
  721. "finger help@idsoftware.com" returns a status report about DOOM and Id's next
  722. game, Quake.
  723.  
  724. The comp.os.linux.help newsgroup is a good place to ask for information about
  725. how to set up Linux itself.  The comp.windows.x.i386unix newsgroup deals
  726. mostly with XFree86 for various 386/486 UNIX variants including Linux.
  727. alt.games.doom is where the DOOMers hang out (beware -- they're mostly MS-DOS
  728. users).  It's also where copies of the DOOM FAQ are posted.
  729. alt.games.doom.announce is where many people post announcements of DOOM-based
  730. utilities and new WAD files.
  731.  
  732.