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

In recent lessons, you have encountered the actions that single sectors can undergo when activated by the special lines. In this room, you will see how a group of active sectors will operate in concert. You will also be shown how sectors can be made to change their special characteristics, and you will see how some active sectors drag others along with them in their actions.

The WAD that has been developed in earlier WAD Sorties will be extended again with further Sorties from this room. First, the single crushing ceiling added at the end of the previous room will acquire some neighbors: together these will act as a chain of crushers through which players will need to time their dash carefully if they are to survive. Additional Sorties will add sectors that move and change to the WAD and finally some actions that entrain several sectors to provide some of DOOM’s most complex multi-sector actions — the donut and self-raising stairs.

Share this post


Link to post

ALL TOGETHER NOW

When you were first introduced to remotely-activated sectors several rooms ago, you were told that it is possible to tag more than one sector to a single trigger. So far, though, you have not seen how these grouped, active sectors behave.

Share this post


Link to post

GROUPING ACTIVE SECTORS

When more than one sector is tagged to a single trigger, there are three ways in which the resulting group of sectors may respond to an activation of the trigger:

  • As a united group, with each member of the group changing to the same new setting
  • As a loose assemblage of sectors, with each member largely doing its own thing, but with occasional actions in one sector affecting some of the other members of the group
  • As a set of individual participants in an action, with each unaware of the actions of the others
Just which of these modes of behavior applies to the group, depends upon the specific action being triggered. For the vast majority of actions, the third type of grouping will apply.

Share this post


Link to post

ACTING IN UNISON

The only actions that cause groups of sectors to act in unison are those affecting the sectors’ lighting levels. If there is more than one sector tagged to a lighting effect trigger, then all of the sectors within the grouping will have their lights brought to the same level. Those actions that refer to adjacent sectors for the new value will obtain that value from amongst the neighbors of only one member — the lowest numbered — of the group. The neighbors of the other members of the group are not considered at all. If you are not careful, this can result in some undesired results, with the entire group refusing to change or changing to an unexpected level.



The four shaded sectors are grouped to a single trigger somewhere of type 80 (WR Lights Change to Brightest Adjacent). These sectors are all of the same brightness level, lower than the other sectors in the figure. Note that if these sectors had been created in the order indicated by the numbers in the left half, then the group’s lowest numbered member (sector 1) has only one neighbor from which to take the new light level value, sector 3. As this sector is itself part of the group (and therefore already at that group’s brightness level), no visible change will result.

It would require the sectors to be numbered as shown in the right half for any change to occur when the trigger was activated. Only with this ordering of sectors does the lowest numbered member of the group have a neighbor that is outside of the group itself. Note that few editors enable you to control the numbering of your sectors. You usually need to have drawn the sectors in the correct order when laying out the WAD. Bear this in mind, then, when planning areas that will use lighting effects involving grouped sectors.

Share this post


Link to post

LOOSE ASSEMBLAGES OF SECTORS

Loose assemblages occur when multiple sectors are in motion as slow crushers. Ordinarily, crushers move independently of each other, moving at a constant speed between each extreme of their travel. Slow crushers, you will recall, slow their motion further when something becomes caught in their downward travel. When several slow crushers are in motion together, the slowing of one can affect the motion of others. DOOM may pass the slowing of the action on to any other crusher that is also moving downwards while the crush occurs. Whether the slowing effect is transmitted or not is determined randomly for each separate crush and is completely outside the WAD designer’s control.

Share this post


Link to post

INDEPENDENT ACTIONS

With the exception of the two categories of action just described, tagging more than one sector to a single trigger will not create any significant grouping of participant sectors. Most of the time, what you achieve with such multi-tagged lines is to use a single line to initiate the same action in more than one location simultaneously, with each sector responding to the action independently of all others. If any member of the group is not available to participate for some reason, then that particular sector will simply not be activated. This non-participant will not prevent any other sector from joining in the action. Similarly, any sector that has its action cut short for any reason will not affect any concurrent activity going on elsewhere.

Share this post


Link to post

END POINTS OF INDEPENDENT ACTIONS

It is important to appreciate that the end points of normal independent sector movements are calculated from the conditions pertaining at the point of initiation and without regard for any other changes that may be in progress at the time. By way of illustration, consider three sectors side-by-side, in a line from west to east, as shown in the figure below.

Imagine first of all (case i) that the floor heights in these three sectors, in order from west to east, are 64, 24, and 0 units and that the western and central sectors are both tagged to a single trigger somewhere of type 82. This trigger brings its target sectors’ floors down to their lowest adjacent floor level.

Consider what happens when this line is triggered. At the point of activation, the western sector’s lowest adjacent floor is to its east, at 24 units, while the central sector’s lowest adjacent floor is also to its east, at 0 units. These are the heights to which these floors will move on the first triggering of this action. You should be able to see that a subsequent triggering of this action will bring the western sector’s floor down to 0 with no movement from the central sector. After that, further activation of the line will have no effect.

Now imagine the same arrangement of sectors and triggers but with different starting heights for the floors of 64, 64, and 0. (Case ii.) On the trigger’s first activation, the central sector will descend to the level of its eastern neighbor, as before. The western sector will not move, how- ever, because at the point of activation it has no neighbor at a different height. A second activation of the trigger is needed to make this sector’s floor move down to join the neighboring floor at its new level.



Note this well: it is a common mistake to group sectors like this in the hope that the tagged pair will move in unison to the lower level. They will not. DOOM considers the movement of each member of the group individually.

Finally, consider what happens if the floors start out at heights of 24, 64, and 0, as shown in case iii. The first time the line is triggered here, the western sector will move up to 64 units—the height of its lowest neighbor at the time of activation. This movement will occur instantaneously. (If you don’t remember why, you may wish to review the previous room’s discussion of movers.) The central sector will move down, at the normal speed, to level 0. Once again, the western sector will move its floor to 0 in the normal manner on the second triggering of the action.

Share this post


Link to post

COORDINATING AND SYNCHRONIZING MULTI-SECTOR ACTIONS

It is common to want several sectors to operate together as a single coordinated or synchronized unit — usually in chains of crushers and other perpetual movers. As you have already seen, though, when moving freely, each participating sector in a multi-sector action will take as much or as little time as it needs to complete its own action, without regard for the movement of any other sector. The only way to achieve synchronization, therefore, is to use the same travel distance for each component.

Bear in mind, too, that slow crushers and perpetual lifts can be delayed in their action as a result of players and monsters becoming caught up in them. When this occurs to single members of a chain of such movers, it will wreak havoc with any synchronization of motion that you had set up.

If you want perpetual movers to remain in phase with each other, you will need to ensure that the range of travel of each participant is the same. With crushers, though, it is often better to make the range of travel different for each component, so that they drift in and out of phase with each other, making it harder for players to time their dash through the entire chain. The next WAD Sortie lets you try a crusher chain out for yourself.

Share this post


Link to post

WAD SORTIE 21: BUILDING A CRUSHER CHAIN

In this Sortie, you will add two more crushers alongside your existing one to complete the secret area located to the south of the southern courtyard.

Share this post


Link to post

AMENDING THE CURRENT CRUSHER ROOM

The new areas are easy to add. You need to split each of the long eastern corridor walls, putting four new vertices where each end of a crusher will appear. By repositioning the inner pair of these vertices, you can reshape the sides of the corridor to provide the required recess. Repeat the operation for each new crusher recess and finally add the new cross-corridor lines that make the faces of the crusher. You should not need to create any further vertices to add these extra lines.



To connect the two new crushers to the same triggers as the original, add the same tag for the original crusher to the two new crusher sectors.

Finally decide on suitable settings for each of the crushing sectors. As well as their heights, you may like to experiment with the overall size of each crusher, as well as the spacing between them. Save and play a few variants to find the best result. Observe how the slow crushers behave as a group when you become caught in one of them. (You will use IDDQD first, won’t you?)

You could try out the room with faster crushers, too. When you are happy with the arrangement, tidy up the texture alignment and name your final WAD D2WAD21.WAD.

Share this post


Link to post

RINGING THE CHANGES

The next group of sector actions to consider are the changers: sectors that change their appearance and behavior as they move.

Share this post


Link to post

THE MOVEMENT OF CHANGERS

All movements associated with changer actions affect only the target sectors’ floors. In this aspect of their operation, changers behave just like movers. Where they differ is in the alterations that their sectors undergo while moving.

Share this post


Link to post

THE CHANGES

As well as moving their floors to new locations, changer actions affect their target sectors in two further ways:

  • The sector’s floor texture changes: This provides sectors that can sink into other areas and vanish, or rise up out of a large area of one floor texture and acquire a new texture to differentiate them from their surroundings.
  • The sector’s special characteristic alters: All changers alter the special characteristic of the sector they affect. Some reset it to 0, cancelling out any special effect that the sector was using. This can turn a sector from a damaging area into a harmless one. Other changers can be made to copy a special characteristic from elsewhere, so that sectors can be turned into harmful ones.

Share this post


Link to post

THE CONTROL SECTOR

The changes that are wrought by these actions are determined partly by the code of the action and partly through the involvement of an additional sector, often known as a control sector. The function of the control sector is to provide DOOM with a source for the new settings that the changing sector is to acquire.

The game engine employs two different methods to determine which sector will act in this capacity, depending upon which special line-type initiates the action:

  • The trigger method: Trigger-method changers take the sector on the right side of their action’s trigger line as the control sector for the changing sector.
  • The first-neighbor (or numeric) method: Changers in this category use a more complicated method of locating a sector to act as a control sector. They examine the changing sector itself to find its lowest numbered two-sided linedef, taking the sector on the other side of this — the changing sector’s first neighbor — as the control sector.
A sector’s first neighbor is usually the one it gained earliest in the creation of the WAD.

When triggered, a changer action will use whichever control sector method is appropriate to its own operation to locate the role-model sector. This sector’s floor texture and, if applicable, its special characteristic are then copied to the tagged target sector as that sector moves.

Below shows these two types of changer in action on the same sector (S). At the top is shown the layout of sectors and floor patterns prior to activation of any changers. The numbers on the lines of the tagged sector show the order in which these lines were drawn (in the WAD as a whole). The lower parts of the figure show the following:
  1. The effect of a trigger-method changer, activated from line T. Notice how the floor texture from the sector on the right side of line T has been transferred to the active sector.
  2. The effect of a first-neighbor changer, activated from the same line as the preceding. Notice how the new floor texture for the active sector has been acquired from its first neighbor.
Different results could be achieved here, of course, by drawing the lines of the tagged sector in a different order.

These actions may appear complicated to use, particularly those involving first-neighbor method changers. Fortunately, in practice, they are rarely so. Areas that are to utilize such changers do need to be planned carefully in advance, however.

Share this post


Link to post

CHANGES TO THE SPECIAL CHARACTERISTIC

Not all values of a sector’s special characteristic can be transferred to a changing sector - only those which involve taking damage, as well as the secret characteristic. For any other, the moving sector acquires a special characteristic of 0.

Share this post


Link to post

CHANGER EFFECTS

Changers that do not transfer the special characteristic from the role-model sector do still change the special characteristic of their target sector. They set it to 0, nullifying any damaging characteristic the sector may have had.

Movements occur in an identical manner to the corresponding mover actions.

Share this post


Link to post

WAD SORTIE 22: USING CHANGERS

This WAD Sortie will show you how to use each of the two categories of sector changers. First of all, though, it will show you how you can utilize a changer as a straightforward mover, thereby expanding the range of available floor-moving actions at your disposal.

Share this post


Link to post

ALTERATIONS BEYOND THE LIFT

In my opinion, the sunken area of corridor in the green stone passageway is a little less than perfect in its operation. The small section of corridor immediately prior to the sunken section is fine while the sunken section is at its starting height, but it looks odd after the sunken section has been raised. It seems strange to have a lower section of corridor between the newly-raised sunken section and the corridor leading back to the lift.

The special line used to raise the sunken corridor currently invokes an action that raises the floor to the next higher adjacent floor—in this case, the floor of the alcove housing the switch. The immediate adjacent corridor section — the one that is upsetting me so — is currently used to isolate the sunken sector from the long corridor, which is only 16 units above the starting height of the sunken floor. If this were the sunken floor’s next higher floor, it would not rise enough to enable the player to go on.

It would be nice to have the ability to raise the sunken floor by a fixed 24 units, rather than having to worry about arranging neighbors at suitable heights. However, the actions to do this are only available as walk-through triggers, and I’d like to keep this operation on a switch. Line-type 15 (S1 Floor Raise by 24 (changes texture)) will work, though; it provides a sector change in addition to the movement, but that will not matter here. Indeed, it won’t even be noticed. This action uses the trigger-method to find the role model; because the sector that houses the trigger for the sunken sector currently has the same floor-texture setting, no visible change will ensue.

All that is needed here then is to change the special attribute of the appropriate trigger line (at the back of the small alcove off the sunken sector) to the value 15. After this modification, the offending short section of corridor can be raised 16 units to –320, so that its floor is no longer lower than the long corridor’s. Put NUKE24 on the new texture surface that this exposes.

Share this post


Link to post

STARTING THE ARENA DEVELOPMENT

The remainder of this Sortie will concentrate on development of the open arena at the northern end of the WAD. The figure below shows how this area needs to be divided up. As you can see, there are a lot of additions here, even though this is but the first stage of the development of the arena. This Sortie concentrates mainly on the arena’s western half. Each new area is detailed shortly.

Share this post


Link to post

ADDING THE NEW AREAS

Start the modifications by changing all of the major wall textures of this arena to WOOD5. Leave the faces of the lift in the southern wall as they are for now, though, so that it remains easy to find. Then enter Draw mode, add the lines for a thin balcony running along inside the northern rim of the arena with STARTAN1 as the new textures.

Next, draw the square area that meets this northern balcony midway across the arena. This sector will eventually form a lookout tower. Follow these lines with those marking out the platform area to the west of the tower. Then mark off the area at the extreme west of the arena — this will form the low arena basin. East from this are four wide steps, formed from lines running between the northwestern platform and the southern wall of the arena; add these next. The steps will lead up from the arena basin, the top step adjoining the large eastern platform and a rectangular pond. The player’s progress from the west will be halted here through the use of an excessive step height.

Make all of these sectors before going on.



The watchtower and northern balcony walls need WOOD5 on their essential textures to make them look like part of the main arena walls. Use BROWN144 on the risers of the steps and STARTAN1 on all remaining essential textures.

The southwest door’s sectors should be changed a little from their earlier settings. Use GSTONE1 on the side walls of the door sector itself as well as the outer door recess. Apply a Y-offset of –16 to these wall sections. WOOD5 is required on the upper over the outer door recess, with its upper unpegged flag set. Put GSTONE1 on the lower essential below the outer face of the door.

Share this post


Link to post

DIVIDING UP THE POND

The nukage-slime pond in the middle of the arena is the area that will use the changers. The next step, then, is to add the additional sectors within the pond. The figure shows the arena again, with the new areas required for the pond.
Start by adding the five shapes that are entirely contained within the pond. These are four square stepping-stones, 64 units or so in size, that lead out across the pond to a slightly larger rectangular island. The stepping-stones will appear to offer a way across the pond but will, in fact, sink below the surface when the player steps on them. (I’ll explain just how this works in a moment.)



Make the sectors for these areas, using Make Sector on the pond sector itself again, afterwards. Then put line-type 37 on each line of each stepping-stone (but not the larger island — this will be somewhere for the player to stop and think). As you set its special attribute, tag each of these lines to its own stepping-stone sector — this way, the sector will sink regardless of which of its boundary lines the player crosses.

The floor settings for each island sector should be FLOOR0_1, at a level of –176. Set the brightness and ceiling values to match all of the other sectors in this area.

Share this post


Link to post

HOW THE STEPPING-STONES WORK

The stepping-stones will operate as follows. Special line-type 37 is a walk-through trigger, which invokes a first-neighbor model changer. This changer lowers a sector’s floor to the height of the lowest adjacent floor, at the same time transferring a floor texture and special characteristic from an adjacent sector.

All of the stepping-stone sectors are completely surrounded by the main sector of the slime pond. No matter which of their lines was drawn first, therefore, their first neighbor will be this pond sector. The main nukage-slime pond will thus act as the role-model sector, so that each stepping-stone will acquire the NUKAGE1 texture as well as the pond’s damaging special characteristic as they move.

Of course, being the only adjacent sector means that the main pond will also provide the new floor setting for the tagged sector. The net effect, therefore, is that as a player steps onto one of the stepping-stones, it will sink to the level of the pond floor. This, combined with its texture change, will cause it to vanish into the slime.

Share this post


Link to post

LETTING THE PLAYER OUT

The main pond sector is currently 32 pixels below the arena’s top step, its lowest adjacent sector. There is thus no escape from the pond. With such a clear invitation to enter it, players will find it annoying in the extreme if they are then caught there until they die. An escape route is needed here.

Escape shouldn’t be made too easy, though, so make it possible only from the very corners. Add the two corner sectors, using a floor height of –192 and a texture of FLOOR0_1. Once again, use STARTAN1 as the essential texture for all these new areas.

Share this post


Link to post

ADDING THE FINAL CHANGER

Finally, add another changer to provide an eventual means of progress across the pond to the eastern platform (and thence the lift). An angled causeway across the northeastern corner of the pond will provide this. It will lead from the northwestern platform (itself accessible from the top step), across the pond to the eastern part of the arena. Initially, though, it will appear to be part of the pond.

After drawing the lines for the new sector, you should give the new causeway sector the same settings as the pond sector, making sure that both have a special characteristic of 7.

Finally, make the new angled piece into a suitable changer. Choose a convenient line to use as the trigger for this action—it doesn’t matter which at the moment, because it is only a temporary arrangement to test the mechanism — and put a switch texture on it so that you will be able to find it easily when you play the WAD. Assign a special attribute of 20 to this line, tagging it to the causeway.

Special line-type 20 provides a switch-activated trigger-model changer that will raise the floor of the tagged sector to the next higher floor level. The floor texture of the sector on the right side of the trigger line is transferred to the sector that is moved. The special characteristic is not transferred but any existing special value is reset to 0.

The angled sector’s next higher neighbor is the western platform sector. This sector therefore provides the new height for the moving sector’s floor, just 16 units below the large eastern platform floor — sufficiently close to allow the player onto it.

The causeway’s new floor texture will be whatever is on the right side of the switch-line that triggered the change. You can confirm this by putting a distinctive floor texture next to the switch and observing that the angled sector acquires it when it is activated. If you were to place the switch action on one of the pond’s enclosing lines that has its right side facing into the pond, then the causeway’s floor texture would not change as it rose. (I don’t recommend that you do this — I’m merely pointing out possibilities!)

The harmful effect of the angled sector’s special characteristic is nullified by the changer (whatever the role model is), making it safe for the player to walk across the new causeway.

The movement of the angled sector will generate some essential textures. Fix these by applying STARTAN1 to them.

Share this post


Link to post

TRYING OUT THE ADDITIONS

You are now ready to save the WAD (as D2WAD22.WAD) and try it out. Try running over the stepping-stones to the island and back. It’s all fine as long as you keep moving, isn’t it? Activate the causeway and confirm that it acquires the correct texture and becomes safe to walk over.

Did you manage to remember all of the essential textures? Below shows a view of the completed pond.

Share this post


Link to post

DRAGGING OTHERS ALONG

The final group of remote-controlled actions that produce moving sectors are the entrainers. These actions affect more than just their target sector.

Share this post


Link to post

DOOM’S DONUT

The first of the entrainers is, in effect, an extended changer. It works in a more complicated way than those described earlier, though. It is generally known as the donut. This action entrains an additional sector in its effect, as follows.

DOOM begins the action by inspecting all of the lines that make up the boundary of the tagged sector to find the linedef with the lowest number (the first-drawn line of this sector). If this line is single-sided, nothing further happens.

If the line is two-sided, however, DOOM inspects it to see which way it faces. If the right side faces into the tagged sector, then this sector’s floor is moved to the level of the floor on the other side of the line. Motion downwards occurs at standard mover speed; movement upwards occurs instantaneously. Any special characteristic of the sector adjacent to the tagged sector is removed. The action is then at an end.

If, on the other hand, the first-drawn line’s right side faces away from the tagged sector, then this neighboring sector is taken to be a “donut” sector. It is this sector that will be consumed (its settings, that is, not its extent; this will be explained shortly). Note that this sector doesn’t actually need to be donut-shaped — it can be any shape at all—but it usually will be, with the tagged sector acting as the “hole” at the center. The figure shows the usual arrangement: a central sector with a donut sector around it. The first-drawn line of the central sector is shown with its right-side tick.

Share this post


Link to post

FINDING A ROLE MODEL

Having found a sector to be the donut, DOOM will proceed with the action by examining this sector to determine its lowest numbered linedef, excluding any that are shared with the original tagged sector. The sector on the other side of this further line (whichever way it faces) becomes a role model for the actions that follow.

Share this post


Link to post

USING THE ROLE MODEL

At this point, DOOM has all of the information it needs to consume its donut (you’re relieved, I’ll bet!). It does this by transferring the floor texture of the role model to the floor of the donut sector (not the original tagged sector, note), setting the donut’s special characteristic to 0 at the same time.

The figure below illustrates this with a simple example: the central tagged sector acts as the hole to its surrounding sector’s donut. This in turn supplies a role model through its lowest numbered linedef. The donut gains the role model’s floor texture.

Share this post


Link to post

EQUALIZING THE FLOORS

At the same time as the floor texture and special characteristic are being changed, the game engine moves the donut sector’s floor up to match the role model’s. The original tagged sector’s floor moves down to the same height. In common with all movers, any motion in the opposite direction to the one expected will occur instantaneously.

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  
×