SRB2 Doom Builder tutorial/Advanced mapping tools

From SRB2 Wiki
Jump to: navigation, search
Warning icon.png
This article or section should contain one or more images. Please spruce up the article by adding an image.
  SRB2 Doom Builder tutorial [view]

Chapter 1: Getting startedChapter 2: Creating level boundariesChapter 3: Sectors and texturesChapter 4: Advanced mapping toolsChapter 5: Special effects and taggingChapter 6: Thing placementChapter 7: Additional tips and tricks

In this chapter, you will learn about some of the more advanced techniques of sector and linedef editing. For example, you will learn how to change the size of sectors, add new linedefs to a sector, and make round shapes and stairs. All of these things can be done manually, but for some of them, SRB2 Doom Builder has specific tools that help you do them easily and quickly.

Flipping linedefs

If you want to change the direction (and thus the sector) that a linedef is facing, you can flip it. There are two ways of doing it: You can either flip a linedef along the X or Y axis, which will not only change its direction but also its location relative to the grid; or you can exchange its front and back sides, which will flip the notch to the other side but won't move the linedef.

The former is done with the Flip Selection Vertically and Flip Selection Horizontally tools. This will simply change the position of the two vertices on one axis, but not on the other, thus "mirroring" the linedef. However, the sector references are not changed, and depending on where it is used, it might cause other linedefs connected to the flipped linedef to cross. The latter is done with the Flip Linedefs tool. This only changes the orientation of the linedef but not its position. The sector references are automatically swapped. This is very useful in situations where you want to apply a texture to several linedefs at once, but the texture would be on the front side for some linedefs and on the back side for others. In this case, you can flip some of the linedefs so that the texture is on the same side for all of them.

Splitting linedefs

Sometimes you want to change the shape of a sector after you've made it. In that case, you might need more linedefs for the sector. For example, try to change the square sector with the raised ground into a pentagon. To do this, you need a fifth linedef. In this case, you can split one of the linedefs by placing another vertex somewhere on top of it in Vertices Mode. Then, you can drag the vertex around to change the shape of the sector.

However, this method doesn't work if the linedef you want to split is diagonal to the grid lines, because there might be no third point where it lines up with the grid. This might be the case with one of the linedefs attached to the vertex you just dragged around. If you want split such a linedef, you can move it around so that it does line up with the grid, but it's easier to just select the Split Linedefs tool, which automatically inserts a new vertex in the middle, regardless of its position on the grid.

Creating stairs

Staircases in SRB2 are essentially just many sectors placed next to each other, with each sector being slightly higher than the previous one. This would be very tedious and repetitive to create manually, but the Gradient Floors tool can make the process much easier and quicker.

To create a staircase, create a small sector that serves as your first step (32×192 fracunits is a good size, for example). Then, in Sectors Mode select the whole sector and copy it. Now, line the new sector up with the old one so that they share one of the longer linedefs with each other, and then paste it. Now copy and paste the sector again and make it overlap with the second sector. Repeat the process until you have 10 sectors in a row. Now you need to do a bit of calculation to find out how high your staircase will be. If we choose an increase of 24 fracunits per step (this is the maximum step height for a working staircase, unless you use a Ramp Sector effect), the last step will be 240 fracunits high. Give the last sector a floor height of 240 fracunits.

The rest can be done automatically. Simply select the sector surrounding the staircase (it should be at a floor height of 0 in this case) and then every sector of the staircase in their proper order. It is very important that you select them in the order in which the steps should increase. Then click the "Gradient Floors" button in the toolbar. Now each step between the first and the last selected sector increases gradually by the same height. If you did everything right, that should be 24 fracunits in ten steps. Of course, a lot the sides are now missing textures, since you didn't apply any yet. Try to apply them on your own to test your understanding of texturing.

Rotating and resizing sectors

Two very useful tools when you work with more complex shapes are the rotating and resizing tools. They allow you to change the size or direction of a sector or even multiple sectors at once. This is very useful when you have complex sector-based constructions that you want to use multiple times in different locations. Both tools also work on Things, but you cannot move sectors and Things at the same time.

For this tutorial, we will rotate and resize the staircase you made in the last step. You should retain the original staircase, so select all sectors that belong to it, copy them and paste them onto an empty part of your level. Then click the Rotate Selection button. You can now enter the rotation value in degrees, and you will see the sectors rotate in real time. For this tutorial, choose a rotation of 90 degrees and click OK.

Now we will resize the staircase with the resizing tool. It works similarly to the rotation tool. Select the whole staircase again and click the Resize Selection button. You can now specify the new size as a percentage of the old size. Negative values additionally flip the selection. Choose 50% and click OK. Your staircase is now half as wide and half as long as before.

If you want to copy and rotate or resize a selection, sometimes the sector where you want to place the selection may be too small to hold the selection before you have rotated or resized it. While you could copy the selection elsewhere first, rotate or resize it there and then copy it to its real location, this may cause some sector references to be incorrect. Instead, try to make the sector where you want to place the selection bigger temporarily. You should use caution with these tools if the selections you want to modify are connected to other sectors. Since the vertices will be moved when using these tools, the adjacent linedefs will be modified as well, which can result in crossing linedefs. Therefore, you should normally only use these tools for isolated constructions like the staircase you used above or for whole levels.

Curving linedefs

Making round or curved sectors manually is very tedious and inaccurate. To make that process much easier, you can use the curving tool, which will automatically split and re-arrange linedefs in such a way that they will form a curve.

For this tutorial, we will make a round sector. As a start, make a 32×256 sector somewhere in the map. The long sides will then be curved, while the short sides can be removed afterwards. Now select both of the long linedefs, but not the two short ones, and click the Curve Linedefs tool. By default, this tool will curve any linedefs inward. In our case, that would lead to crossing linedefs, which we must avoid. Because of that, add a minus in front of the curve distance value. This will curve the linedefs outwards. By default, this tool will try to make the linedefs as circular as possible. You can change the shape by modifying the curve distance and the delta angle. By increasing the number of vertices, you can make the shape more accurate, but this will make the level harder to render and may cause lag in-game if you overdo it. Click OK and your sector will be transformed into a circle.

If we want an accurate circle, we need to delete the two linedefs that are left over from the initial sector, since they break the circular shape. For that, simply select the two linedefs and delete them. Then select one of the two halves and drag it on top of the other one. No sector references need to be corrected, since the sector is still closed in the same way as before.

  SRB2 Doom Builder tutorial [view]

Chapter 1: Getting startedChapter 2: Creating level boundariesChapter 3: Sectors and texturesChapter 4: Advanced mapping toolsChapter 5: Special effects and taggingChapter 6: Thing placementChapter 7: Additional tips and tricks