home *** CD-ROM | disk | FTP | other *** search
/ Demon Gate Mega Collection / DemonGateMegaCollection.bin / text / neat.txt < prev    next >
Text File  |  1995-09-06  |  14KB  |  333 lines

  1.                                 Neat WAD design
  2.  
  3. There are of course a lot of neat things you can put in your WAD. Currently
  4. I've only put in the following small thing:
  5.  
  6.   1.  Door on top of Lift
  7.      or "Hallways that pass without holes in the floor".
  8.   2.  Descending Stairs
  9.   3.  Switches and textures
  10.  
  11.  
  12.                             1. Door on top of lift
  13.                 ======================
  14.  
  15. The title says it all. If you have two hallways that cross in a square sector,
  16. you can basically make this sector into a combination of a lift and a door.
  17. Meaning that the lower part of the sector is a lift, while the upper part is a
  18. door. I'll try to draw it in a 3d way:
  19.  
  20.         ----------------x-----------x----------------------
  21.                /|             |\
  22.               / |        | \
  23.              /  |        |  \
  24.     ----------------x-------------------x-----------------------
  25.             |   |        |   |
  26.             |   | /          \    |   | <------DOOR
  27.             |   |/           \|   |
  28.         ------------|---x-----------x---|------------------
  29.             |  /|        |\  |
  30.             | / |        | \ |
  31.             |/  |        |  \|
  32.     ----------------x-------------------x-----------------------
  33.                /|   |           |   |\
  34.               / |   | /          \ |   | \
  35.              /  |   |/           \|   |  \
  36.             /   |   x-----------x   |   \
  37.            /    |  /             \  |    \
  38.           /    | /          \ |      \
  39.              |/           \|       
  40.             x-------------------x
  41.                /             \
  42.               /        ^          \
  43.              /        |           \
  44.                 /        |        \
  45.            /          LIFT         \
  46.           /                  \
  47.  
  48.  
  49. I figured this out on my own, and published it to the doom editing mail list in
  50. October 1994. However at the time this was a well known effect, and even id
  51. used it in DOOM ][. However I'll include my example wad from back then:
  52. doors.zip (9K)
  53.  
  54.  
  55.                             2. The Descending Stair
  56.                 =======================
  57.  
  58. How to make a raising stair is well known from the original DOOM levels, but
  59. it's actually also possible to create a descending stair. It's not too
  60. complicated, as the descending stair looks much like the raising one, at least
  61. on the map:
  62.                            
  63.     (The numbers are sector numbers)
  64.  
  65.     :        :
  66.     :    7    :
  67.     |        | (The dotted lines are two sided
  68.     x...............x  linedefs, while the dashed lines
  69.     |        |  are one-sided)
  70.     |    6    |
  71.     |        |
  72.     x...............x
  73.     |        |
  74.     |    5    |
  75.     |        |
  76.     x...............x
  77.     |        |
  78.     |    4    |
  79.     |        |
  80.     x...............x
  81.     |        |
  82.     |    3    |
  83.     |        |
  84.     x...............x
  85.     |        |
  86.     |    2    |
  87.     |        |
  88.     x...............x
  89.     |        |
  90.     :    1    :
  91.     :        :
  92.  
  93. When you have made this map, you should assign a floor height of 48 to the
  94. sectors 2, 3, 4, 5, 6 and 7 while sector 1 should have a floor height of 0. Now
  95. you can set up the normal raise stair linedef and tag it to sector 1. When the
  96. linedef is activated, the stair will snap into place immediately. Be careful
  97. when you design the stair, as each step will have a height of at most 8 pixels,
  98. which can easily prove to be too little.
  99.  
  100. The descending stair was first demonstrated by Sean Malloy
  101. (malloy@crash.cts.com) who released the dnstair.zip (3K). The effect is also
  102. demonstrated in special1b.zip (73K), where you can find it by going through the
  103. SKY door, turn right and press the switch. This should lower the floor you're
  104. standing on into a descending stair.
  105.  
  106. To get around the 8 pixels limit on the height of each step, you can create
  107. "dummy" sectors where the floor height of the dummy sector sets the level you
  108. want the step to drop to. To illustrate, consider the following map:
  109.  
  110.             (The numbers are sector numbers)
  111.  
  112.     :        :
  113.     :    7    :
  114.     |        | 
  115.     x...............x--x 
  116.     |        :  |
  117.     |    6    :12|
  118.     |        :  |
  119.     x...............x..x
  120.     |        :  |
  121.     |    5    :11|
  122.     |        :  |
  123.     x...............x..x
  124.     |        :  |
  125.     |    4    :10|
  126.     |        :  |
  127.     x...............x..x
  128.     |        :  |
  129.     |    3    :9 |
  130.     |        :  |
  131.     x...............x..x
  132.     |        :  |
  133.     |    2    :8 |
  134.     |        :  |
  135.     x...............x--x
  136.     |        |
  137.     :    1    :
  138.     :        :
  139.  
  140.  
  141. Here you can set the height of sector 1 to be 0, and set a height of 120 for
  142. the sectors 2, 3, 4, 5, 6 and 7. The sectors 8-12 should be a stair from height
  143. 0 to 120 with a step height of 20. You can set the ceiling height of each of
  144. these sectors to equal the floor height, which should conceal the sectors
  145. completely (if you align the textures). Now set up a linedef like 23 to all the
  146. sectors 2, 3, 4, 5 and 6. The linedef 23 drops the sectors to the lowest floor
  147. height in the adjacent sectors, which means that each step is lowered to the
  148. floor height of the adjacent "dummy" sector.
  149.  
  150. This special effect is also demonstrated in spcial1b.zip (73K). You can find it
  151. by taking the door to the south east. Go straight through the following room,
  152. and press the switch in the hallway. The hallway behind you should then drop
  153. into a combined stair that goes down and back up. This effect was described by
  154. Ray Greenwell (ray@frappe.extern.ucsd.edu).
  155.  
  156. The previous way of creating the descending stair works well if the stair goes
  157. down alongside a wall. If that's not the case, you'll have to experiment with
  158. other linedefs and other ways of concealing the dummy sectors. (Like making
  159. them small, or creating them away from the map in a place where the player
  160. never enters. See how it's done in the invisible raising stairs section).
  161.  
  162.  
  163.                 3. Switches and textures
  164.                 ========================
  165.  
  166. The special effects in this section are all inspired by Drake O'Brien. To view
  167. the effects in question, go through the door marked "Switches" in spcial1b.zip
  168. (73K). Here you will see a normal switch straight ahead. Try to activate it
  169. using the spacebar. It doesn't work? OK then try to shoot it. A hole should
  170. appear in the switch revealing another switch below. You can activate the
  171. switch below using the spacebar.
  172.  
  173. Now you can turn left, where you will see a new type of switch with four
  174. actions. The first four times you activate this switch, a new door will open.
  175.  
  176. Now go through the fourth door you have opened, and operate the switch straight
  177. ahead. That should start the "road runner" animation. (At the same time the
  178. door back to the main area is opened again).
  179.  
  180.                 The Exploding Switch
  181.  
  182. This is an easy application of new textures to switches. The switch isn't
  183. actually exploding, but a hole appears in it when it's shot. The same technique
  184. can be used to create glass that breaks when shot. To implement this I
  185. recommend you get a copy of WinTex or DeuTex.
  186.  
  187. You can't make your own new switch texture, but you can override one of the old
  188. ones. This means that you should be very careful when you're selecting the
  189. textures you wish to redefine. Only redefine textures textures where you're
  190. sure you don't need the original.
  191.  
  192. To make the special effect you need to Apply a switch on a 2 sided linedef.
  193. This is impossible with the original DOOM switch textures, as they are all
  194. multipatch textures. So you need to redefine one of the SW1nnn, SW2nnn pairs,
  195. where the "nnn" is any switch name. Both the SW1nnn and SW2nnn textures should
  196. be redefined to be one-patch textures, or a texture suited for a 2s wall. In my
  197. WAD I've created a texture that consists of the switch and nothing else (one
  198. patch). The second texture (SW2nnn) should be almost the same as the first
  199. texture except now you have added cyan where you want a hole in the switch. You
  200. might also change the look of the switch around the hole so that it looks bent.
  201.  
  202. In the WAD, the effect looks like this:
  203.  
  204.             (The numbers are sector numbers)
  205.  
  206.         x---x
  207.         | 2 |
  208.     x-------x...x---x
  209.     |        |
  210.     |      1    |
  211.     |        |
  212.     :        :
  213.  
  214.  
  215. Where sector 1 is the room you walk around in, and sector 2 is a small sector
  216. used to create the switch. The switch texture should be applied to the 2-sided
  217. wall between sector 1 and 2. At the same time a G1 action should be associated
  218. with the linedef. This way the texture will change when the switch is shot. On
  219. the back of sector 2 you can put any kind of texture you wish the player to see
  220. through the hole in the switch. In my WAD I've put another switch here.
  221.  
  222. So why does it work? Why can't the switch at the back of sector 2 be activated
  223. before the new exploding switch has been shot?
  224.  
  225. The answer is quite simple:
  226. When the player presses the spacebar, DOOM will look at the linedefs inside the
  227. reach of the player with the closest lindef first. Only linedefs with an
  228. associated action is considered, and linedefs that can only be activated once
  229. (S1, G1 or W1) will only be considered if they haven't already been activated.
  230. At the end DOOM will have the closest non-activated linedef with an associated
  231. action. If this linedef can't be activated by the spacebar, nothing happens. If
  232. it can be activated by the spacebar, the action is performed.
  233.  
  234. The rules for linedef activation (As I know them - There are errors in this):
  235.  
  236.  Line
  237.  type:                              Activated by:
  238.  
  239.    G  The player shoots through or at the line. Any shot can trigger multiple
  240.       "gun" actions.
  241.  
  242.    W  The player moves so that his centre crosses the line. If the linedefs
  243.       are overlaid, the player can activate as many as 9 "walk" linedefs just
  244.       by moving one pixel.
  245.  
  246.    S  The player presses spacebar standing in front of the line (facing the
  247.       line). There must not be any non-activated lines (of ANY type) between
  248.       the player and the line in question. The player can only activate one
  249.       "switch" linedef at a time.
  250.  
  251. Which in this case means that before the front switch is shot, it will be
  252. impossible to activate the switch at the back of sector 2.
  253.  
  254.                 Multiple action switch
  255.  
  256. You've already seen the multiple action switch. The exploding switch from
  257. before is actually a multiple action switch. Instead of applying a G1 action to
  258. the front linedef, all you need is to apply a S1 action, and the player can
  259. activate the switch twice by pressing space. Instead of making a hole in the
  260. switch in the SW2nnn texture, you can make it disappear completely, by using an
  261. all cyan patch. That way the switch underneath will be completely exposed when
  262. the first switch has been activated. This can be repeated many time with
  263. different looking switches. In my WAD I've created a four action switch. To
  264. give the impression that the switch isn't disappearing, I've made the gap
  265. between one switch and the next as small as one pixel. This way it looks as if
  266. it's not four different switches you activate, but one switch that changes four
  267. times.
  268.  
  269. The switch textures I use only change a little from action to action, but
  270. remember that they need to be applied to 2 sided walls, so you can't use
  271. overlaid patches.
  272.  
  273.                 Broken Glass
  274.  
  275. It should now be easy to see how you can apply the same technique from the
  276. exploding switch to make a glass texture that breaks when shot. Simply apply a
  277. glass texture to one of the SW1nnn textures, and a broken glass texture to the
  278. corresponding SW2nnn texture, and apply a G1 action to the glass linedef in the
  279. WAD. That way the glass will appear to break, when shot. This effect was
  280. invented by Alberto Barsella (alberto@astrpi.difi.unipi.it).
  281.  
  282.                 Animated Switch
  283.  
  284. The last effect in the "switches" room, is an animation triggered by a switch.
  285. This effect was first implemented by Brian K. Martin (brian@phyast.pitt.edu).
  286. The effect requires a bit more of the WAD designer (Yes that's you). First of
  287. all you need to know which textures form animation starts and ends. Using
  288. WinTex this is no big problem, as all the animation start and end textures can
  289. be selected from a drop down menu, so I won't explain that in any further
  290. details (If you're not using WinTex that's your problem, not mine).
  291.  
  292. To set up the effect, you need to define the SW2nnn texture as a part of the
  293. animation between the "anim start" texture and the "anim end" texture. For
  294. instance your texture definitions could be like this:
  295.  
  296.       SW1nnn       # The first frame of a switch
  297.       ANIM_START   # The start of an animation (Select one of the start
  298.                       points from the WinTex menu)
  299.       SW2nnn       # This is the second frame of the switch from before.
  300.                      Since it's between ANIM_START and ANIM_END,
  301.                      it will become part of this animation.
  302.       SOME_TEX     # Then follows a few frames of the animation
  303.       SOME_MORE
  304.       ...
  305.       ANIM_END     # This is the last frame corresponding to the animation
  306.                      started before. You can select this from the same
  307.                      WinTex menu.
  308.  
  309. Remember not to use the actual names listed above. Instead you should find
  310. original animation and switch textures from DOOM and redefine them.
  311.  
  312. You may want to be able to start an animation elsewhere, meaning that you don't
  313. want the animation to be displayed at the switch being activated, but want it
  314. somewhere else. To achieve this you need to overlay two linedefs. To overlay
  315. linedefs, you have to merge the end vertices, but keep two (or more) separate
  316. lines between the same two vertices.
  317.  
  318. Only one of the overlaid lines will be shown when the WAD is playing, so the
  319. other will be completely invisible. This other line could be set to hold the
  320. animation, while the line that shows should contain a switch texture. Remember
  321. though that the line that shows will not be activated when the animation is
  322. turned on. You might think that it's stupid to create an animation that doesn't
  323. show, but now you can set up a line elsewhere, and give it the same sidedef as
  324. the hidden overlaid line. That way the animation is displayed here.
  325.  
  326. This last effect requiring overlaid linedefs has not been implemented in my
  327. example wad.
  328.  
  329. -------------------------------------------------------------------------------
  330. DOOM is a trademark of id Software.
  331. -------------------------------------------------------------------------------
  332. Jens Hykkelbjerg / hykkelbj@daimi.aau.dk
  333.