home *** CD-ROM | disk | FTP | other *** search
/ Doom Magazine 2 / Doom_magazine_02.bin / utils / edmap / builder.txt < prev    next >
Text File  |  1995-02-03  |  8KB  |  187 lines

  1.  
  2. This is the README file for IDBSP10.ZIP - a port of id's BSP builder to DOS.
  3.  
  4. The package consists of two programs, IDBSP.EXE and WAD_DWD.EXE; source for 
  5. both is included.  Be warned that my source is VERY UGLY.  This was literally 
  6. a "quick and dirty" port.  But, owing to the efficiency of id's algorithm, 
  7. the BSP builder is pretty fast!
  8.  
  9. Programs were compiled by DJGPP v1.11m5; that's "DJs port of GCC to
  10. DOS" version 1.11 maint 5, which means GCC v2.5.7.  The programs have the 
  11. DOS extender (GO32) prepended to them, so no support files (other than 
  12. EMU387 if you need coprocessor emulation) are required.
  13.  
  14. Send comments, requests, etc. to Ron Rossbach at ej070@cleveland.freenet.edu
  15.  
  16.  
  17. Thanks to:
  18.  Tom Neff (tneff@panix.com) for developing the WIF format
  19.  Matt Fell (matt.burnett@acebbs.com) for the "Unoffical DOOM specs" v1.3
  20.  Colin Reed (DYL@CIX.COMPULINK.CO.UK) and Raphael Quinet for providing the
  21.      first BSP builder....BSP11x
  22.  DJ Delorie for porting GCC to DOS.
  23.  All the WAD authors and level editor authors out there....keep up the great
  24.      work!
  25.  And of course, John Carmack and the guys at id for releasing the source to
  26.      their BSP builder!
  27.  
  28. Please use the source code in your own levels editors, utilities, etc.  
  29. Please credit id and myself if you use the code in your programs.  Feel free 
  30. to re-distribute this package, as long as you distribute the WHOLE package,
  31. including source and README, and give credit where credit is due.
  32.  
  33.  
  34. You may not use these programs or source to create modified levels for the
  35. shareware version of DOOM.
  36.  
  37. DOOM is a registered trademark of id Software, Inc.
  38.  
  39. =========
  40. IDBSP.EXE
  41. =========
  42.  
  43. IDBSP.EXE is a straight port of the NextStep Objective-C source uploaded to
  44. ftp.uwp.edu in April, 1994 by John Carmack of id.  The program takes a DWD
  45. file as input and builds a PWAD file which can then be used with the -file
  46. command line parameter for DOOM.  A DWD file is basically an "ASCII WAD" file;
  47. it is a text file containing descriptions of the vertices, linedefs, sidedefs,
  48. sectors, and things on a level.  IDBSP takes this information and 
  49. automatically generates the remaining resources needed for the level - SEGS, 
  50. SSECTORS, NODES, REJECT, and BLOCKMAP.
  51.  
  52. For this port, I've added two extensions to id's original DWD format:
  53.  
  54.     1) A "level:E?M?" (where ? is the episode and level) directive marks 
  55.     the beginning of each map level.  Multiple levels can be included in a 
  56.     single DWD file.
  57.  
  58.     2) Any other WAD resource (demos, pictures, etc) is "included" into 
  59.     the DWD file by a directive "resource :size" (note the space between 
  60.     the end of the resource name and the colon), where "resource" is the 
  61.     resource name (like DEMO1, CREDIT, ENDOOM, etc) and size is the total 
  62.     size in bytes the data for the resource will occupy.  When IDBSP 
  63.     encounters this directive, it looks for a file called "resource.lmp" 
  64.     (where resource is the resource name) in the current directory.  It 
  65.     then pulls this file into the PWAD.  No data conversion is performed.  
  66.     The feature is provided mainly for re-building existing PWADs.  Use 
  67.     DMAUD, DMGRAPH, etc. to perform data conversion.
  68.  
  69. For more information on the DWD file format, see the WIF spec by Tom Neff
  70. (tneff@panix.com).  IDBSP currently supports id's original DWD format, with
  71. the two extensions listed above.
  72.  
  73. The command format for IDBSP is:
  74.  
  75.                 IDBSP dwdfile [wadfile]
  76.  
  77. where "dwdfile" is the name of the DWD file, and "wadfile" is the name of the
  78. PWAD to be created.  If you do not specify "wadfile", TMP.WAD will be created.
  79. If you specify the name of an existing WAD file, IDBSP will ask if you want
  80. to overwrite the file.  If you say no, IDBSP will append the new information
  81. to the existing WAD file.  This lets you build a single PWAD from many DWD
  82. files.
  83.  
  84. Since I'm new to the DJGPP environment, I'm not sure I got the math 
  85. coprocessor emulation right.  The program works with a coprocessor, but I 
  86. don't have a machine to test it with the coprocessor emulation library 
  87. (EMU387).  If you don't have a coprocess on your machine, and want to give 
  88. IDBSP a try, you need to set up an envionment variable called "GO32" to 
  89. point to the emulation library.  The command looks like this:
  90.  
  91.             SET GO32=emu library
  92.  
  93. where "library" is the path to the EMU387 library.  For example,  EMU387 is
  94. in the C:\GCC\BIN directory on my machine, so I would use the following:
  95.  
  96.             SET GO32=emu c:\gcc\bin\emu387
  97.  
  98. I haven't dived completely into the BSP algorithm used by IDBSP, but the
  99. resulting PWAD files are smaller and somewhat faster than those created by
  100. BSP11x.  As Matt Fell said in the specs, this is probably due to id's BSP
  101. algorithm being tuned to generate a BSP tree with the fewest splits, rather 
  102. than trying to fully balance the BSP tree.  Also, IDBSP provides automatic 
  103. building of the REJECT resource, which will speed up all those line of sight 
  104. calculations the DOOM engine does.  BSP11x currently doesn't do this.  Of 
  105. course, the amount of speed-up provided by REJECT depends on the level 
  106. creator using the proper linedef attributes (like "blocks sound") handle 
  107. when the monsters are "activated".
  108.  
  109. ===========
  110. WAD_DWD.EXE
  111. ===========
  112.  
  113. WAD_DWD.EXE is a program which takes a WAD file as input and generates a
  114. corresponding DWD file.  The DWD file can then be used as input to IDBSP.
  115. WAD_DWD is necessary since no available DOOM editors create DWD files on 
  116. their own.  For resources other than map levels, WAD_DWD will create a file 
  117. called "resource.lmp" where "resource" is the resource name, in the same 
  118. directory as the DWD file.  All of these files are input for IDBSP.
  119.  
  120. The command format for WAD_DWD is:
  121.  
  122.                 WAD_DWD wadfile [dwdfile]
  123.  
  124. where "wadfile" is the name of the WAD file, and "dwdfile" is the name of 
  125. the DWD file to create.  If you do not specify a DWD file, TMP.DWD is 
  126. created.  All .LMP files are written to the current directory.
  127.  
  128. WAD_DWD does not do any floating point math.  If you have problems running it
  129. on a machine without a coprocessor, see the discussion on the emulation 
  130. library and GO32 enivornment variable above.
  131.  
  132. =======================
  133. USING WAD_DWD and IDBSP
  134. =======================
  135.  
  136. To use WAD_DWD and IDBSP to build your own PWADs, do the following:
  137.  
  138. 1) Use any level editor to create your level, and save to a WAD.  You don't
  139.      need to have the editor perform any BSP building.
  140.  
  141. 2) Use WAD_DWD to translate the WAD from the level editor to a DWD file.
  142.  
  143. 3) Use IDBSP to create a new WAD from the DWD file containing all BSP
  144.      information.
  145.  
  146. You can also re-build complete PWADs supplied by others, but see CAVEATS 
  147. below.
  148.  
  149. =======
  150. CAVEATS
  151. =======
  152.  
  153. There is one limitation to IDBSP and WAD_DWD that I know of:
  154.  
  155. 1) DEMOs recorded on levels built with another BSP utility (like BSP11x) 
  156.    won't work correctly after the level is re-built by IDBSP.  I think this 
  157.    is due to some BSP information (related to enemy/player position) being 
  158.    stored in the demo file;  obviously this information is invalidated when 
  159.    a different BSP algorithm is used.  This is should only be an issue when 
  160.    you re-build PWADs supplied by others.
  161.  
  162. Otherwise, PWADs build with another BSP utility (like BSP11x) re-build fine
  163. with WAD_DWD and IDBSP.  If the PWADs don't include DEMOs, there
  164. are no problems.
  165.  
  166. To quote John Carmack of id, referring to his BSP builder:
  167.  
  168. "BTW, there IS a bug in here that can cause up to a four pixel wide
  169. column to be drawn out of order, causing a more distant floor and
  170. ceiling plane to stream farther forward than it should.  You can
  171. sometimes see this on E1M1 looking towards the imp up on the ledge
  172. at the entrance to the zig zag room.  A few pixel wide column of
  173. slime streams down to the right of the walkway.  It takes a bit of
  174. fidgeting with the mouse to find the spot.  If someone out there
  175. tracks it down, let me know..."
  176.  
  177. I haven't tracked it down, so the bug has been ported with the rest of the
  178. program.  I haven't actually seen the problem on any levels I've built, 
  179. though.
  180.  
  181. Please send me an e-mail if you uncover any other problems.  Also, source is
  182. included for those with strong stomachs.  :-)
  183.  
  184. I hope you enjoy these programs....hopefully they will help with 
  185. incorporating complete BSP functionality into the level editors.  Happy 
  186. DOOMing!
  187.