home *** CD-ROM | disk | FTP | other *** search
/ Demon Gate Mega Collection / DemonGateMegaCollection.bin / text / special.txt < prev    next >
Text File  |  1995-09-07  |  21KB  |  518 lines

  1.                               WAD Special Effects
  2.  
  3. This text will constantly make references to the example WAD: spcial1b.zip
  4. (53K). The spcial1b.zip is a zipped file, and can be unzipped on a PC using
  5. Pkzip 2.04G (Binary).. I suggest you start by reading the contents, which
  6. follow below. Here you can jump directly to the special effect that interests
  7. you. If you need to read one of the other sections first, there will be a
  8. reference in the start of the section.
  9.  
  10. Contents
  11.  
  12.   1.  The Deep Water effect
  13.   2.  Invisible Stairs
  14.   3.  Invisible Lift
  15.   4.  Non-convex Invisible Areas
  16.   5.  The Transparent Door effect
  17.   6.  The Solid Window effect
  18.  
  19.                            1. The Deep Water effect
  20.  
  21. To see the deep water effect, you can load in the spcial1b.zip (73K) WAD, and
  22. find the door marked SWIMPOOL to the west. Behind this door, you'll find a
  23. swimpool. When you walk into this swimpool, you will see that your viewpoint
  24. gradually lowers, giving you the illusion that you are walking on the button of
  25. the swimpool, and not on the surface of the water.
  26.  
  27. The first time I saw this special effect demonstrated was in swimpool.zip (2K)
  28. by Robert Fenske Jr. (rfenske@swri.edu), where the effect is demonstrated
  29. convincingly in a single room. The effect was first described by Mathew J
  30. Ledding-Hill, and it was later improved by Robert Fenske Jr. The discovery of
  31. the deep water effect has lead to all kinds of other special effects, as we
  32. shall see later.
  33.  
  34. This is one of the effects, that will give errors from any consistency
  35. checkers, so if you don't want to see any errors from your editors consistency
  36. checker, don't try to build this special effect. To build this special effect,
  37. you need an editor that lets you change the sector references in a sidedef.
  38. Some editors won't allow this, and are useless for this purpose. If you don't
  39. already know an editor that can change the sidedef references, I suggest you
  40. look around and try a few more editors. You might even learn an important
  41. lesson by doing this: No editor can currently claim to be the best at all
  42. things. One editor might be good at creating sectors, but doesn't allow you to
  43. set the 2s flags for yourself, while another has a great THING editor, but
  44. don't work too well with new graphics. Do what I do: Shift a lot between
  45. editors, and find the best editor for the task at hand.
  46.  
  47. Construction of the Deep Water
  48.  
  49. To create the deep water effect, you take advantage of the following rule:
  50.  
  51. If you create a sector inside another sector, where the internal sectors
  52. sidedefs ONLY has sector references to the internal sector, then the floor
  53. texture will be painted in the floor height of the external sector, while the
  54. player will walk around in the floor height of the internal sector.
  55.  
  56. To give an example, create the following map:
  57.  
  58.     (The numbers are sidedef sector references)
  59.     x-----------------------x
  60.     |        1        |    (The dotted lines are two sided
  61.     |            |     while the dashed lines are one-sided)
  62.     |        2        |
  63.     |    x.......x    |
  64.     |    :   2    :    |
  65.     |1     2:2     2:2     1|
  66.     |    :   2    :    |
  67.     |    x.......x    |
  68.     |        2        |
  69.     |            |
  70.     |        1        |
  71.     x-----------------------x
  72.  
  73. Now set the floor texture of sector 1 to F_WATER, set the floor height of
  74. sector 1 to 0, and set the floor height of sector 2 to be -40. This gives the
  75. impression of walking around in a pool of water. You can also set the floor
  76. height of sector 2 to be 70, and you will feel like flying. (Remember to make
  77. the ceiling high enough, so that a player can walk around in the height of 70).
  78. Also be careful when setting a height below -40 (relative to the floor), as you
  79. will get a HOM effect if the player get his head under water.
  80.  
  81. This first example is great fun, but it doesn't really lead anywhere, as it's
  82. difficult to take the step of 40 units to get out of the deep water. To be able
  83. to both enter and leave the deep water, you will need to create sectors within
  84. sectors in different heights, so that they form a descending stair into the
  85. pool. This is very easy to construct:
  86.  
  87.     (The numbers are sidedef sector references)
  88.     x---------------------------------------x
  89.     |            1            |
  90.     |                    |
  91.     |            2            |
  92.     |    x.......................x    |
  93.     |    :        2        :    |
  94.     |    :            :    |
  95.     |    :        3        :    |
  96.     |    :    x.......x    :    |
  97.     |    :    :   3    :    :    |
  98.     |1     2:2     3:3     3:3     2:2     1|
  99.     |    :    :   3    :    :    |    
  100.     |    :    x.......x    :    |    
  101.     |    :        3        :    |
  102.     |    :            :    |
  103.     |    :        2        :    |    
  104.     |    x.......................x    |
  105.     |            2            |
  106.     |                    |
  107.     |            1            |
  108.     x---------------------------------------x
  109.  
  110. This resembles the WAD: swimpool.zip (2K) created by Robert Fenske Jr. Here you
  111. can assign a floor height of 0 for sector 1, while sectors 2 and 3 get a floor
  112. height of -24 and -48 respectively. This will make the water quite deep, while
  113. it's still possible to climb out of it.
  114.  
  115. Please note that in this special effects we use sectors inside sectors, to
  116. create the special effect needed. If we want to create other things like an
  117. invisible stair, it's suddenly quite difficult to form the stair, so that it
  118. consists of sectors inside sectors. Instead another method can be applied.
  119.  
  120.                               2. Invisible Stairs
  121.  
  122. If you haven't read about the deep water effect , I suggest you do that now.
  123. The invisible stair special effect is very similar to the deep water effect. To
  124. find the special effect in the example WAD: spcial.zip (73K) , you should find
  125. the door marked "INVISIBLE STAIR" to the south, behind which you will be able
  126. to try the effect.
  127.  
  128.             Construction of invisible stairs
  129.  
  130. As I mentioned earlier it's impossible to build a stair with sectors inside
  131. sectors like in the deep water. Instead I'll remind you of the general rule:
  132.  
  133. If you create a sector inside another sector, where the internal sectors
  134. sidedefs ONLY has sector references to the internal sector, then the floor
  135. texture will be painted in the floor height of the external sector, while the
  136. player will walk around in the floor height of the internal sector.
  137.  
  138. This general rule implies that it's possible to create an invisible stair like
  139. this:
  140.  
  141.     (The numbers are sidedef sector references)
  142.  
  143.     x-----------------------x
  144.     |      1        |
  145.     |         2        |
  146.     |    x.......x    |
  147.     |    :    2    :       |
  148.     |1     2:2     2:2     1|
  149.     |       :    2  :    |
  150.     |    x.......x    |
  151.     |         2        |
  152.     |      1        |
  153.     x.......................x
  154.     |      3        |
  155.     |         4        |
  156.     |    x.......x    |
  157.     |    :    4    :       |
  158.     |3     4:4     4:4     3|
  159.     |       :    4  :    |
  160.     |    x.......x    |
  161.     |         4        |
  162.     |      3        |
  163.     x.......................x
  164.     |      5        |
  165.     |         6        |
  166.     |    x.......x    |
  167.     |    :    6    :       |
  168.     |5     6:6     6:6     5|
  169.     |       :    6  :    |
  170.     |    x.......x    |
  171.     |         6        |
  172.     |      5        |
  173.     x.......................x
  174.     |      7        |
  175.     |         8        |
  176.     |    x.......x    |
  177.     |    :    8    :       |
  178.     |7     8:8     8:8     7|
  179.     |       :    8  :    |
  180.     |    x.......x    |
  181.     |         8        |
  182.     |      7        |
  183.     x.......................x
  184.  
  185.  
  186. The sectors 1, 3, 5 and 7 are the steps, and they should all have floor height
  187. 0. (This is the height in which the floor is painted). Now give the sectors 2,
  188. 4, 6 and 8 some different floor heights (for instance 16, 24, 40 and 56
  189. respectively). This is the height in which the player will walk. Then you have
  190. an invisible stair.
  191.  
  192.             Invisible rising stair
  193.  
  194. Now that you've created an invisible stair, you might want to go on and create
  195. an invisible rising stair. This is a bit difficult, but not impossible. I'll
  196. explain how to do it by extending on the stair that you already created . To
  197. have the stair start in the lower position set the floor heights of sectors 2,
  198. 4, 6 and 8 to zero. Now for a rising stair to work, the sectors need to be
  199. neighbours, but none of the sectors 2, 4, 6 or 8 are neighbours to other
  200. sectors than themselves, so we'll need to do some kind of trick to get it to
  201. work. The trick is this: create new neighbouring sectors that form a stair, and
  202. edit the sidedef sector references so that these new sectors get the same
  203. numbers: 2, 4, 6 and 8. Since sector 2, 4, 6 and 8 are neighbours now we can
  204. make the rising stair work just like a normal rising stair.
  205.  
  206. One word of advise though: The linedef number of the new sector created should
  207. be smaller than any of the linedefs in the original sector. This can be hard to
  208. accomplish with most editors, so I advise you to build the dummy sectors 2, 4,
  209. 6 and 8 before the invisible stair itself.
  210.  
  211. If you forgot to build the dummy sectors first, I can give you the following
  212. DEU trick: Split old lines in two, and one of the parts will get a new line
  213. number (higher than any other line number) normally the "front" part will get
  214. the new number:
  215.  
  216.  before:   split:   drag:
  217.  
  218.     ^        ^
  219.     |        |   <- New line number.
  220.     |        |
  221.     |        x   <- drag this vertex
  222.     |        |
  223.     |        |
  224.     x        x   <- to this vertex, and merge the two vertices.
  225.  
  226. When you've completed the new sectors, your invisible stairs should look like
  227. this:
  228.  
  229.     (The numbers are sidedef sector references)
  230.  
  231.     x-----------------------x
  232.     |      1        |
  233.     |         2        |
  234.     |    x.......x    |
  235.     |    :    2    :       |
  236.     |1     2:2     2:2     1|    The "dummy" sectors:
  237.     |       :    2  :    |
  238.     |    x.......x    |
  239.     |         2        |    x-------x In the dummy sectors
  240.     |      1        |    |   2    | there are no special
  241.     x.......................x    x.......x sidedef sector references,
  242.     |      3        |    |   4    | so only one number is
  243.     |         4        |    x.......x displayed inside each sector.
  244.     |    x.......x    |    |   6    | this is the sector number,
  245.     |    :    4    :       |    x.......x and all sidedef references
  246.     |3     4:4     4:4     3|    |   8    | are created just as usual.
  247.     |       :    4  :    |    x-------x
  248.     |    x.......x    |
  249.     |         4        |
  250.     |      3        |
  251.     x.......................x
  252.     |      5        |
  253.     |         6        |
  254.     |    x.......x    |
  255.     |    :    6    :       |
  256.     |5     6:6     6:6     5|
  257.     |       :    6  :    |
  258.     |    x.......x    |
  259.     |         6        |
  260.     |      5        |
  261.     x.......................x
  262.     |      7        |
  263.     |         8        |
  264.     |    x.......x    |
  265.     |    :    8    :       |
  266.     |7     8:8     8:8     7|
  267.     |       :    8  :    |
  268.     |    x.......x    |
  269.     |         8        |
  270.     |      7        |
  271.     x.......................x
  272.  
  273.  
  274. Now you can make a linedef somewhere to activate the raising stair, and make it
  275. point to sector 2. The invisible raising stair is demonstrated in spcial1b.zip
  276. (73K) just behind the first invisible stair. If you let yourself drop down
  277. behind the first invisible stair, you will find it impossible to get back
  278. before you press the button, which triggers the invisible rising stair.
  279.  
  280. Note however that the invisible stair is not entirely invisible. I've put a
  281. small texture on one of the steps, so you can see it raise...
  282. Only the normal texture on the special inner sector is shown, so to create a
  283. texture that sticks to the invisible raised floor like here, I've used the
  284. "lower unpegged" flag.
  285.  
  286. Remember to put the dummy sectors close to the raising stair, as the sound
  287. propagates from the dummy sectors, and NOT from the special sectors inside the
  288. steps of the stair. (Actually I think the sound is generated by the lowest
  289. numbered linedef, which we put in the dummy sector). This could of course be
  290. used to generate a "Silent Invisible Raising Stair", but that might not be much
  291. fun.
  292.  
  293.                                3. Invisible Lift
  294.  
  295. Now that you've seen how to create an invisible raising stair, an invisible
  296. lift should be easy to create. An example invisible lift can be found to the
  297. north in spcial1b.zip (73K). The invisible lift turns out to be easier than the
  298. invisible raising stair, because there is only 1 step...
  299.  
  300. To create the lift you need to create dummy sectors again. Otherwise the
  301. special self-referencing sector will not be able to determine how low it should
  302. go. Remember to create the dummy sector first, so the linedefs here get the
  303. lowest numbers. The lift should look like this:
  304.  
  305.     (The numbers are sidedef sector references)
  306.  
  307.     :            :
  308.     :            :
  309.     |        4        |
  310.     |            |
  311.     x-----------------------x
  312.     |      1        |
  313.     |         2        |
  314.     |    x.......x    |
  315.     |    :    2    :       |
  316.     |1     2:2     2:2     1|    The "dummy" sectors:
  317.     |       :    2  :    |
  318.     |    x.......x    |
  319.     |         2        |    x-------x 
  320.     |      1        |    |   2    | 
  321.     x.......................x    x.......x 
  322.     |              |    |   3    | 
  323.     |                 |    x.......x 
  324.     :       5        :
  325.     :            :
  326.  
  327.  
  328. Assign a floor height of 0 to the sectors 1, 3 and 4, while the sectors 2 and 5
  329. get a higher floor height like 64. Then make the linedef between sector 4 and 1
  330. a switch activated lift, and make the sector reference point to sector 2. Now
  331. make the linedef between sector 5 and 1 trigger when the player walks over it,
  332. and the sector reference should again point to sector 2.
  333.  
  334. That's all. Now your invisible lift should be working. The dummy sector 3
  335. determines how low the lift will go, and the linedefs neighbouring sector 1 are
  336. set up to activate sector 2 as a lift, which controls the floor height.
  337.  
  338.                          4. Non-convex Invisible Areas
  339.  
  340. Now that you know how to create invisible stairs and invisible lifts, you might
  341. think that you know how to apply this effect to any area, but if the outer
  342. sector isn't convex you'll get into trouble in no time. The problem is that any
  343. sub sector in the special raised sector needs to be a neighbour to the special
  344. self referencing sector inside. If this requirement is not met, you will drop
  345. to the level of the outer sector, and you could get trapped. To make sure this
  346. doesn't happen, you should simply create the inner sector so large that there
  347. simply is no room for the player to drop to the actual floor height.
  348.  
  349. An example of a non-convex sector where you still can walk around in the air is
  350. given in the east part of spcial1b.zip (73K). Here I've enlarged the inner
  351. sector to almost fill the outside sector entirely. The following figure might
  352. clarify what I mean:
  353.  
  354.     x-----------------------x
  355.     |.......................| (The dotted line is the internal 
  356.     |:               :|  self-referencing sector.
  357.     |:     ...........     :|  See the WWW page for a more exact 
  358.     |:     :x-------x:     :|  representation of this)
  359.     |:.....:|    |:.....:|
  360.     x-------x    x-------x
  361.  
  362.  
  363. This ensures that all sub sectors are either inside the special sector, or is
  364. at least a neighbour to it. Now we have covered a lot about invisible floors.
  365. lets look at a different special effect:
  366.  
  367.                              5. Transparent Doors
  368.  
  369. The transparent doors can be viewed in the deathmatch WAD spchaunt.zip (86K)
  370. created by Robert Fenske, Jr. (rfenske@swri.edu)
  371.  
  372. The same effect can also be viewed in the north part of spcial1b.zip (73K),
  373. where I've used the standard DOOM 1 open door linedef. The effect is better if
  374. you use the blasting doors now available in version 1.666 and higher. As you
  375. can see in special.wad, there is a considerable amount of HOM when the door is
  376. opened and closed. This looks much better when the blasting doors are used.
  377.  
  378. You might think that the transparent doors could be built much like the floor
  379. special effects we have seen so far, but since the DOOM engine treats sectors
  380. with the same ceiling and floor height in a special way this won't work.
  381. Instead another method has to be used.
  382.  
  383.             Construction of the Transparent Door
  384.  
  385. (by Robert Fenske, Jr)
  386.  
  387. In June of 1994, Alberto Barsella (alberto@astrpi.difi.unipi.it) reported to
  388. the DOOM editing mailing list that he had found a way to create transparent
  389. doors. His method was more cumbersome than the method shown below, but
  390. nevertheless paved the way to using this feature in new WADs.
  391.  
  392.          (The numbers are sededef sector references and
  393.       the Ln are line numbers for further reference)
  394.  
  395.        L1       L3       L5
  396.     ....----x-------x----....
  397.         :   3    :
  398.         :    :
  399.      1    :2     2:     4
  400.         :    :
  401.           L7:    :L8
  402.         :    :
  403.         :   3    :
  404.     ....----x-------x----....
  405.        L2       L4       L6
  406.  
  407.  
  408. As shown in the figure above, you must start with a three-region section of a
  409. level. You can start with a normal door sector and modify it appropriately. I
  410. will refer to the area bounded by LINEDEFS L3, L8, L4, and L7 as the door area.
  411. The six LINEDEFs labelled L1 through L6 are usual one-sided LINEDEFs. The two
  412. LINEDEFs L7 and L8 are two-sided ones that will constitute the actual door
  413. look. Sectors 1 and 4 are normally created sectors (and could be the same
  414. sector - see the note below). However, there are two sectors inside the door
  415. area, 2 and 3. The crucial aspects of a transparent door are all contained in
  416. LINEDEFs L7 and L8; the ordering of LINEDEFS L3, L4, L7, and L8; and sector 2.
  417.  
  418. The table below details the specific requirements for each LINEDEF and sector:
  419.  
  420.         LINEDEF/SECTOR                  Description
  421.  
  422.                 L1              one-sided wall, normal texture
  423.                 L2              one-sided wall, normal texture
  424.                 L3              one-sided wall, normal texture
  425.                 L4              one-sided wall, normal texture
  426.                 L5              one-sided wall, normal texture
  427.                 L6              one-sided wall, normal texture
  428.                 L7              two-sided wall no upper texture,
  429.                                 one-patch transparent normal texture with Y
  430.                                 offset equal to height of texture
  431.                                 optional lower texture,
  432.                                 second SIDEDEF references sector 2
  433.                 L8              two-sided wall, no upper texture,
  434.                                 one-patch transparent normal texture with Y
  435.                                 offset equal to height of texture
  436.                                 optional lower texture,
  437.                                 second SIDEDEF references sector 2
  438.  
  439.                 1               floor height F, ceiling height C
  440.                 2               floor height F+1, ceiling height F+1
  441.                 3               floor height F, ceiling height C-1
  442.                 4               floor height F, ceiling height C
  443.  
  444. The most crucial requirement is not in the above table. This requirement is
  445. that one of the LINEDEFs L3 and L4 MUST have a lower index number than L7 or
  446. L8. If this is not the case, a HOM effect will be present inside the door. This
  447. ordering is required because the DOOM engine uses the lowest-numbered SEG in a
  448. SSECTOR (subsector) to determine which SECTOR to use to draw the SSECTOR.
  449. Technically, at least one of the SEGS derived from LINEDEFS L3 and L4 must be
  450. the lowest-numbered SEG of the SSECTOR created from the door region (or
  451. lowest-numbered SEG for each of the SSECTORs created if the region is split in
  452. any way or the region is non-convex to start with). In principle, having
  453. LINEDEFs L3 and L4 with lower indices than L7 and L8 could not guarantee the
  454. correct SEGs generation. But as a practical matter all the node builders I am
  455. aware of preserve the SEGs ordering and any extra SEGs created during the node
  456. generation are attached to the end of the SEGs list (and thus will never have
  457. lower indices than the SEGs originally derived from L3 and L4).
  458.  
  459. Though the lower unpegged ("Lo") bit of LINEDEFs L3 and L4 are typically set
  460. for a normal door, this bit is irrelevant for movement for a transparent door
  461. as the sector associated with these LINEDEFs never moves. It's only use would
  462. be to anchor to the bottom the particular textures on these LINEDEFs. Do not
  463. make the transparent door wide enough so that a player can be fully inside the
  464. door when it closes. If this happens, the player has no way to get the door to
  465. open because the player will now be facing the left side of the LINEDEFs that
  466. are the door (L7 and L8) and consequently the door will not be activated.
  467. However, switches could be placed on LINEDEFs L3 and L4 to open the door.
  468.  
  469. note: IF you create the door so that it has the same sector on both sides of
  470. the door, you should be aware that this means that sounds will pass through the
  471. door and might wake monsters on the other side. Maybe this is exactly what you
  472. want, and using this you can create doors that let sounds pass.
  473.  
  474. Transparent door with closed sectors
  475.  
  476. If you don't like to create the transparent door using the special sector
  477. configuration above, you can also do it like the SKY door.
  478.  
  479.     (The numbers are sector numbers)
  480.  
  481.     :        :
  482.     :    5    :
  483.     |        |
  484.     x...............x
  485.     |.           .|
  486.     | .          . |
  487.     |3 x    2    x 4|
  488.     | .          . |
  489.     |.           .|
  490.     x...............x
  491.     |        |
  492.     :    1    :
  493.     :        :
  494.  
  495.  
  496. The sectors 1, 3, 4 and 5 should have floor height 0, while sector 2 (the door)
  497. has both floor and ceiling height 1. No textures should be applied to the
  498. linedefs between the sectors 3, 4 and 2, while the transparent door texture can
  499. be applied to the lines between the sectors 1, 5 and 2.
  500.  
  501. Obviously this closed sector arrangement has 4 more lines in it than the
  502. previous transparent door effect. Both methods work just fine, so you should
  503. make up your own mind: do you want 4 extra linedefs, or unclosed sectors?
  504.  
  505.                           6. The Solid Window effect
  506.  
  507. (by Robert Fenske Jr.)
  508.  
  509. The solid window effect is a window that the player can see through, but can't
  510. shoot through. Now that you've seen how to construct the transparent door
  511. special effect, it should be easy to make a solid window. You just omit the
  512. linedefs that opens the door, and place the "stuck" door inside the window.
  513.  
  514. -------------------------------------------------------------------------------
  515. DOOM is a trademark of id Software.
  516. -------------------------------------------------------------------------------
  517. Jens Hykkelbjerg / hykkelbj@daimi.aau.dk
  518.