home *** CD-ROM | disk | FTP | other *** search
/ DoomWare Developers Network / DoomwareDevelopersNetworkCd-OccurrenceI1994cytechCodehouse3c66710c.iso / occurenc / other1 / wads / idbsp.txt < prev    next >
Text File  |  1994-10-20  |  8KB  |  185 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 
  4. both is included.  Be warned that my source is VERY UGLY.  This was literally 
  5. a "quick and dirty" port.  But, owing to the efficiency of id's algorithm, 
  6. the BSP 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 
  11. you 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 
  22.    great 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" 
  44. file; it is a text file containing descriptions of the vertices, linedefs, 
  45. sidedefs, sectors, and things on a level.  IDBSP takes this information 
  46. and automatically generates the remaining resources needed for the level 
  47. - SEGS, SSECTORS, NODES, 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 
  52.        the beginning of each map level.  Multiple levels can be included 
  53.        in a single DWD file.
  54.  
  55.     2) Any other WAD resource (demos, pictures, etc) is "included" into 
  56.        the DWD file by a directive "resource :size" (note the space 
  57.        between the end of the resource name and the colon), where 
  58.        "resource" is the resource name (like DEMO1, CREDIT, ENDOOM, etc) 
  59.        and size is the total size in bytes the data for the resource 
  60.        will occupy.  When IDBSP encounters this directive, it looks for 
  61.        a file called "resource.lmp" (where resource is the resource name) 
  62.        in the current directory.  It then pulls this file into the PWAD.  
  63.        No data conversion is performed.  The feature is provided mainly 
  64.        for re-building existing PWADs.  Use DMAUD, DMGRAPH, etc. to 
  65.        perform data conversion.
  66.  
  67. For more information on the DWD file format, see the WIF spec by Tom Neff
  68. (tneff@panix.com).  IDBSP currently supports id's original DWD format, with
  69. the two extensions listed above.
  70.  
  71. The command format for IDBSP is:
  72.  
  73.                 IDBSP dwdfile [wadfile]
  74.  
  75. where "dwdfile" is the name of the DWD file, and "wadfile" is the name of the
  76. PWAD to be created.  If you do not specify "wadfile", TMP.WAD will be created.
  77. If you specify the name of an existing WAD file, IDBSP will ask if you want
  78. to overwrite the file.  If you say no, IDBSP will append the new information
  79. to the existing WAD file.  This lets you build a single PWAD from many DWD
  80. files.
  81.  
  82. Since I'm new to the DJGPP environment, I'm not sure I got the math 
  83. coprocessor emulation right.  The program works with a coprocessor, 
  84. but I don't have a machine to test it with the coprocessor emulation 
  85. library (EMU387).  If you don't have a coprocess on your machine, and want 
  86. to give IDBSP a try, you need to set up an envionment variable called "GO32" 
  87. to point to the emulation library.  The command looks like this:
  88.  
  89.             SET GO32=emu library
  90.  
  91. where "library" is the path to the EMU387 library.  For example,  EMU387 is
  92. in the C:\GCC\BIN directory on my machine, so I would use the following:
  93.  
  94.             SET GO32=emu c:\gcc\bin\emu387
  95.  
  96. I haven't dived completely into the BSP algorithm used by IDBSP, but the
  97. resulting PWAD files are smaller and somewhat faster than those created by
  98. BSP11x.  As Matt Fell said in the specs, this is probably due to id's BSP
  99. algorithm being tuned to generate a BSP tree with the fewest splits, rather 
  100. than trying to fully balance the BSP tree.  Also, IDBSP provides automatic 
  101. building of the REJECT resource, which will speed up all those line of 
  102. sight calculations the DOOM engine does.  BSP11x currently doesn't do this.  
  103. Of course, the amount of speed-up provided by REJECT depends on the level 
  104. creator using the proper linedef attributes (like "blocks sound") handle 
  105. when the monsters are "activated".
  106.  
  107. ===========
  108. WAD_DWD.EXE
  109. ===========
  110.  
  111. WAD_DWD.EXE is a program which takes a WAD file as input and generates a
  112. corresponding DWD file.  The DWD file can then be used as input to IDBSP.
  113. WAD_DWD is necessary since no available DOOM editors create DWD files on 
  114. their own.  For resources other than map levels, WAD_DWD will create a file 
  115. called "resource.lmp" where "resource" is the resource name, in the same 
  116. directory as the DWD file.  All of these files are input for IDBSP.
  117.  
  118. The command format for WAD_DWD is:
  119.  
  120.                 WAD_DWD wadfile [dwdfile]
  121.  
  122. where "wadfile" is the name of the WAD file, and "dwdfile" is the name of the
  123. DWD file to create.  If you do not specify a DWD file, TMP.DWD is created.  
  124. All .LMP files are written to the current directory.
  125.  
  126. WAD_DWD does not do any floating point math.  If you have problems running it
  127. on a machine without a coprocessor, see the discussion on the emulation 
  128. library and GO32 enivornment variable above.
  129.  
  130. =======================
  131. USING WAD_DWD and IDBSP
  132. =======================
  133.  
  134. To use WAD_DWD and IDBSP to build your own PWADs, do the following:
  135.  
  136. 1) Use any level editor to create your level, and save to a WAD.  You don't
  137.    need to have the editor perform any BSP building.
  138.  
  139. 2) Use WAD_DWD to translate the WAD from the level editor to a DWD file.
  140.  
  141. 3) Use IDBSP to create a new WAD from the DWD file containing all BSP
  142.    information.
  143.  
  144. You can also re-build complete PWADs supplied by others, but see CAVEATS 
  145. below.
  146.  
  147. =======
  148. CAVEATS
  149. =======
  150.  
  151. There is one limitation to IDBSP and WAD_DWD that I know of:
  152.  
  153. 1) DEMOs recorded on levels built with another BSP utility (like BSP11x) won't
  154.    work correctly after the level is re-built by IDBSP.  I think this is due 
  155.    to some BSP information (related to enemy/player position) being stored in 
  156.    the demo file;  obviously this information is invalidated when a different 
  157.    BSP algorithm is used.  This is should only be an issue when you re-build
  158.    PWADs supplied by others.
  159.  
  160. Otherwise, PWADs build with another BSP utility (like BSP11x) re-build fine
  161. with WAD_DWD and IDBSP.  If the PWADs don't include DEMOs, there
  162. are no problems.
  163.  
  164. To quote John Carmack of id, referring to his BSP builder:
  165.  
  166. "BTW, there IS a bug in here that can cause up to a four pixel wide
  167. column to be drawn out of order, causing a more distant floor and
  168. ceiling plane to stream farther forward than it should.  You can
  169. sometimes see this on E1M1 looking towards the imp up on the ledge
  170. at the entrance to the zig zag room.  A few pixel wide column of
  171. slime streams down to the right of the walkway.  It takes a bit of
  172. fidgeting with the mouse to find the spot.  If someone out there
  173. tracks it down, let me know..."
  174.  
  175. I haven't tracked it down, so the bug has been ported with the rest of the
  176. program.  I haven't actually seen the problem on any levels I've built, 
  177. though.
  178.  
  179. Please send me an e-mail if you uncover any other problems.  Also, source is
  180. included for those with strong stomachs.  :-)
  181.  
  182. I hope you enjoy these programs....hopefully they will help with 
  183. incorporating complete BSP functionality into the level editors.  Happy 
  184. DOOMing!
  185.