Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
Linguica

[Vanilla Level Editing] Lesson 10: Complex Moving Sectors

Recommended Posts

THY DONUT CONSUMED

The net result of this action is that both the tagged sector and its surrounding donut end up at the same floor height as the role-model sector—usually the sector that surrounds the donut itself. The donut’s floor texture is changed and any harmful effect it had is nullified in the process. You have no doubt seen many instances of this effect in use. It is commonly employed to place goodies out of reach on a central platform, surrounded by a damaging sector, which is consumed when the appropriate switch is pressed.

Share this post


Link to post

IMPLEMENTING A DONUT

The easiest way to ensure that donuts work correctly is to draw the whole structure at one time. The steps in the process are:

  • Start by drawing the complete inner donut-hole. The first line you draw must have its right side facing out from this sector, so draw this sector in a counter-clockwise manner.
  • Draw the outer donut sector next, starting with the line that will border the sector that is to act as role model.
  • Avoid splitting any of these lines in future edits. Most editors will assign new (later) line numbers to the new lines so created—this can mess up DOOM’s identification of both the donut sector and its role model.
  • Locate a suitable switch line for the action: the donut is only available as a single activation, space-bar-operated action. Tag this line to the inner donut-hole sector. Set the line’s special attribute to the value 9.

Share this post


Link to post

SELF-RAISING STAIRS

DOOM’s other entraining action is the self-raising staircase. This action drags further sectors along with it, using an entraining method similar to the donut's.

Share this post


Link to post

FINDING THE STEPS

The action starts, as always, with the tagged sector. This sector will become the first step of a new staircase. DOOM then looks for a two-sided line that has its right side facing into the tagged sector. If there are more than one of these, the one with lowest number is taken. The sector on the other side of this line becomes the second step of the staircase.

This process is repeated until one of the following conditions occurs:

  • No two-sided line has a right side facing into the current sector.
  • A sector is met with a different floor texture.
  • A sector is encountered that is already part of this action.
  • A sector is encountered that is currently locked out of floor height changes.
The sectors selected by this process all take part in the action that follows.

The figure below illustrates this entrainment process in operation. In each case, the sector marked with the solid circle is the initial tagged sector. The upper part of the figure shows a simple arrangement of sectors. The action’s selection of sectors is brought to a halt by the lack of further inward-facing right sides after four sectors.



The lower portion of the figure shows a more complicated arrangement of sectors. The entrainment process has been made easier to follow here by careful manipulation of the way the lines face. Each participating sector has only one two-sided line with its right side facing into it — an arrangement that is recommended you adopt when building these structures yourself. Notice how the selection of sectors in the lower example is terminated when a sector that is already part of the action is revisited.

Share this post


Link to post

MOVING THE STEPS

The tagged sector’s floor provides the reference height from which all of the other sectors’ final floor heights are calculated. This first sector will be raised by a standard step-height — 8 or 16 units, depending upon the type of staircase in use — from its starting position. Each sector in the sequence after this will finish one step-height above the previous.

Once the sectors for the entire staircase have been located, and their final floor heights are determined, DOOM starts the floors of all these sectors moving simultaneously, accompanied by appropriate sound effects. The result is a block of sectors moving together, with each successive sector stopping as its floor reaches its allotted height.

Any sectors of the staircase that start out above their finishing height are moved to their new height instantaneously.

Self-raising stairs will operate as crushing floors, doing harm to anything caught in the closing gap between their floor and ceiling. They are also capable of driving their floors up through their ceilings; it is probably not a good idea to let them.

Share this post


Link to post

BUILDING SELF-RAISING STAIRWAYS

From their description, self-raising stairs may sound complex to build. In reality, they are generally quite easy. The main steps (sorry!) involved are as follows:

    1. Draw the sectors for the staircase, starting with the bottom step and working upwards.
    2. Again starting from the bottom step, select each sector in turn, making sure that the line bordering the next step in the sequence has its right side facing into the selected sector. Make sure that all other two-sided lines have their right sides facing out from the sector. This saves you from having to worry about the numbering of lines, which is often beyond your control anyway. Leave single-sided lines with their right sides facing in, of course.
    3. Make sure that all of the two-sided lines of the last sector in the sequence have their right sides facing into other sectors.
    4. Make sure that all the sectors of the staircase have the same floor texture.
    5. Decide on a suitable activation line for the staircase. You can use either a switch or a trigger. Set this line’s special attribute to the appropriate value.
    6. Tag the trigger line to the first sector to move: the bottom step of the staircase.
If you find that your staircase fails to operate correctly, check the direction of all of its lines—and watch out for those floor-texture changes!

Share this post


Link to post

WAD SORTIE 23: USING ENTRAINERS

This Sortie will develop the eastern end of the outdoor crescent-shaped area that lies beyond your blue-keyed door. It adds a new room with a donut-eater; a self-raising stairway will also provide another connection to the embryonic maze area.

Share this post


Link to post

ADDING THE DONUT

The figure below shows the general location of a new room, at the eastern edge of your WAD.

The new room will be entered through a short passageway, connected (via a new keyed door) to an alcove area towards the eastern end of the crescent. The next figure shows all the new lines needed for this area, with the cursor arrow pointing to the southeastern corner of the sector that will become the donut.



Share this post


Link to post

ADDING THE NEW DOOR AND ENTRANCE PASSAGE

Start this new development by building a red-keyed door off the crescent. It should have outer and inner recesses, as usual. Make the door as close to 256 units wide as you can for best alignment of the door texture. Don’t forget to apply suitable textures to the side-walls of the recess to tell the player that the door needs a key. Use BIGDOOR2 on the door itself.

Next draw the two sectors of the entrance passageway. Use GRAYVINE on the walls of the larger of these, DOORBLU2 on the short walls of the small one beyond.

Share this post


Link to post

THE DONUT ROOM

Next, draw all the new lines for the main room and donut. Use GRAY7 as the texture for the outer walls of the room.

The table below gives the settings for all of the new sectors in this area. Note that some of the sectors use special characteristics—mostly of a damaging variety.



Use GRAY1 on all essential textures.

Finally, split one of the room’s outer walls by adding another vertex 64 units from one of the corners, and put the SW1GRAY texture on the new short length of wall. (Don’t worry about the alignment and vertical repetition of this texture — it is only a temporary arrangement.) Set the special attribute of this line to 9 (S1 Floor Raise Donut (changes texture)) and tag it to the central pillar sector. Make sure that all of the lines of the central pillar face out — this saves the worry about which is the lowest numbered — and that’s the donut made. Simple, in the end, wasn’t it?

Before adding the stairs, you may want to save the WAD (as D2WAD23.WAD) and try out the donut.

Share this post


Link to post

SELF-RAISING STAIRS

The area with a self-raising staircase will also be off the crescent-shaped courtyard. It will connect this courtyard to the embryonic maze area.

Share this post


Link to post

ADDING A NEW DOOR

Start by adding another red-keyed door off the currently closed northeastern end of the crescent, drawn to match the door’s blue counterpart at the other end with BIGDOOR2 on the door face, and suitable recesses. You may need to rearrange the end of the crescent a little to get the door 256 units wide and to have it line up properly for a connection beyond it. Figure 10.17 shows a close-up view of the new door, with recesses outside, on the crescent side of the door, and inside next to a funnel-shaped entrance for a passageway.

Make the new door operate by using a special attribute of 28 (DR Door (Red) Open Wait Close) on the outer side, facing the crescent. The door should be one-way, however, so put no special attribute on its other, inner face. Use the DOORSTOP on the side walls of the inner recess as an indicator that the door doesn’t open from this side. Then draw and make the sector beyond the inner recess using STONE2 as the default texture. Apply the settings in the table to the sectors you have so far.



Share this post


Link to post

CONSTRUCTING THE CORRIDOR AND STAIRS

The figure below shows the number and arrangement of sectors beyond the funnel-shaped corridor section. They should all be drawn with the STONE2 wall texture.

Make the first of these sectors, setting its lighting level to 96. All of its other settings should be the same as the neighboring funnel-shaped sector. This is to be the first step of the self-raising stairway.

You can now start making the other steps. Note that the number of sectors used here is important, if the fully risen staircase is to end at the correct height. Another twelve sectors will be used, so that the final floor height of the top step will be 13×8 = 104 units above the current floor height.

Draw the next five sectors, taking the ceiling of the last of these up to 160 to increase the headroom available here. Then make the additional sectors up to the corner, where the ceiling needs to go up again, this time to 192. Make the last four staircase sectors, once again taking the ceiling up on the last of these, this time to 224. Notice how the ceilings here rise steadily to prevent the player from being crushed as the stairs rise. The increment used for the ceiling step is 32 units to ensure that the wall texture (which has a 32-pixel pattern repeat) stays aligned.



Now draw the last of the corridor sectors, taking its ceiling up to 256. This sector will not be part of the rising staircase, so its floor needs to be at a suitable height. Set it to 112 to match the floor of the maze area close by. The top step will end its movement just 8 units below this, leaving a final step up to the end corridor section.

Now, to make the staircase work, go into Linedefs Mode and select the line marking the entrance into the narrow area of the corridor. Put a special attribute of 8 (W1 Stairs Raise By 8) on here, tagging the line to the first step sector to its north. Check that this line has its right side facing into the sector to its south, otherwise you will find the wrong sector becomes entrained into the raising staircase.

If you now examine all of the lines marking the risers for the remaining steps of the staircase, you should find that they already have their right sides facing into the step below them. This is what you want. Put STEP3 on the right lower texture slots of all of these risers — they are latent essentials, remember. The line connecting the last step with the end section of the corridor needs to be flipped so that its right side faces away from the last moving step. This will end the entrainment of sectors into the rising stair. Put STONE2 on the essentials of this line. Locate the lines where you changed the ceiling height, and put STONE2 on the upper essentials here, too.

That completes the construction of the staircase, but you need to finish off the area before you can try it out.

Share this post


Link to post

COMPLETING THE CORRIDOR

Make a short sector to connect your new corridor to the right half of the maze area. You will find that as you do this, the new sector inherits a tag. Don’t worry about this; this is what you want it to do. This sector’s lighting level will now follow the right-half of the maze’s. Set the new sector’s ceiling to 112 (the same as its floor) and put a special attribute of 1 (DR Door Open Wait Close) on the corridor face of this new door. Remember that this line-type does not need to be tagged to a sector, but it does need the line to face the correct way.

Put texture STONE3 on its upper texture facing the corridor (with a Y-offset of 16. You want a slight change of texture, not a lurch in the alignment.) Use a CRATE texture on the other side of the door, so that it is not noticeable from the maze. Do not provide any method of opening the door from this side, however, because I do not want the player to be able to leave the maze by this route. Complete the door by setting its side walls’ lower unpegged flags, again using Y-offsets of 16.

Share this post


Link to post

MAKING AN EXIT FROM THE MAZE

This completes the additions to the map. Given the right keys, a player can now pass through the crescent section, up the new stairs, and into the maze — only to become trapped, of course, at the top of the marble stairs.

Let us arrange for players entering the maze by this route to trigger the removal of the impediment of the one-way stairs. You will recall that the trap on this staircase was created by placing two ceilings at special heights. We need, therefore, something to trigger the raising of these ceilings. Line-type 40 provides a walkthrough action which raises a ceiling to the height of its highest adjacent ceiling. Position two of these triggers as you feel appropriate on suitable risers of the new back stairs into the maze.

You will need to order these triggers correctly and space them out sufficiently to allow one ceiling to have moved fully before the other is triggered. And you will have to tag them to the correct marble staircase sectors, of course. Don’t forget, too, that this will create a latent essential texture somewhere on the marble stairs. Use MARBLE1 on this.

When you’ve done this, you can save the WAD (as D2WAD23A.WAD) and try it out.

Share this post


Link to post

SUGGESTED FURTHER MODIFICATIONS

There are a number of additional modifications that spring to mind for the areas you have just added.

MAKING THE STAIRS LESS OBVIOUS

You can make the presence of the corridor containing the rising stairs less obvious by raising the floor of the first step to 48. (You’ll have an essential texture to deal with if you do this.) Use a special line-type of 23 (S1 Floor Lower to Lowest Floor) on one of the short walls adjacent to the door with a suitable texture (SW1SATYR, perhaps?) and tagged to the newly-raised sector.

A LITTLE JOKE?

To balance up the areas around the door, you may wish to use the same (or another) switch texture on the other wall at the side of the door. There isn’t much for this switch to do, but line-type 41 (S1 Ceiling Lower to Floor) tagged to the inner door-recess would convince the player that there really is no way out here. If you add this modification, change the upper texture over the recess to BROWN144 to match better with SW1SATYR, and set a couple of lower unpegged flags. In addition, you will need to tag this sector to another trigger to raise it again, in case the player ever comes back through the door from the other side! You can do that by adding a trigger of type 40 (W1 Ceiling Raise to Highest Ceiling) to one of the stair risers.

TIDYING THE MARBLE STAIRS

Raising the ceilings to remove the one-way stair trap leaves the stairway’s walls a little messy. You might want to try tidying them up. Anything you do will be a compromise, however — it’s just about impossible to have this perfect for all contingencies here.

Share this post


Link to post

EXIT: MOPPING UP AND MOVING ON

In this room, you learned about the most complex of DOOM’s active sectors. You have learned how sectors behave when they are asked to move together; you have learned about role model emulation by sectors that move and change; and you have seen and used crusher chains, moving and changing platforms, donuts, and self-raising stairs in your own WAD. In fact, you have now seen all of the active line-types that DOOM provides for sector movement and change.

The next room, “Let’s Get the Hell Out of Here!”, will present the few remaining special line-types — those that act on the player, rather than on elements of the map. Its WAD Sorties will have you adding some of the final components of the DOOM world to your almost completed WAD.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×