home *** CD-ROM | disk | FTP | other *** search
/ DOOM 2 Mania / doomiimaniavolume1techexpresssoftware1995.iso / doommisc / edmap121 / builder.txt < prev    next >
Text File  |  1994-06-04  |  8KB  |  181 lines

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