Scroller tutorial

From SRB2 Wiki
Jump to navigation Jump to search

Scrollers are linedef types that scroll textures or flats in a certain direction. Also, players standing on a scrolling sector or climbing on scrolling walls will be carried with the scroller. The most notable use for scrollers are conveyor belts, which are a great way of changing up the gameplay flow a bit. Apart from that, there are several other uses and implementations of this effect, depending on the used linedef types. This tutorial explains how to use them.

Setup

Wall scrollers

There are three different techniques for scrolling walls, each with a slightly different setup. However, all of them only scroll the front textures of the target linedef. The back textures cannot be scrolled. All linedef scrollers carry players that are climbing on the walls with them.

Linedef type 500 and linedef type 501 simply scroll the walls to left and right, respectively, at a default speed. They are directly applied to the linedefs whose walls should be scrolled. If the speed needs to be specified, linedef type 502 is used. For this, a control sector is created, and one of its linedefs is given the same tag as the target linedef that should be scrolled. The length and direction of the control linedef determine scrolling speed and direction of the target linedef, respectively.

For walls that should scroll vertically or diagonally, linedef type 505 or linedef type 506 is used. Linedef type 505 specifies the scrolling speed through the front side offsets. The X offset determines horizontal speed and the Y offset determines vertical speed. Positive values make the textures scroll right/up, while negative values make them scroll left/down. If the front side offsets are already used for texture alignment, linedef type 506 can be used, which uses the back side offsets instead.

Plane scrollers

Plane scrollers scroll flats instead of textures. Depending on the linedef type used, they scroll either the ceiling or the floor. Additionally, one can specify if the flat is scrolled, the player is carried or both. In most cases, linedef type 530 is used for floor scrollers and linedef type 533 for ceiling scrollers, which are used in reverse gravity situations or to scroll the top of an FOF. These both scroll the flat and carry the player, making them ideal for conveyor belts. For purely visual effects, like scrolling water surfaces for example, linedef type 510 and linedef type 513 are used. If you want only the carrying effects without scrolling, use linedef type 520 and linedef type 523.

The first step is to set up the control sector. Everything is controlled by the linedef with the linedef special that should be tagged to the target sector. Speed is specified by the length of the linedef. The direction is determined by the direction the linedef is facing. This can be a bit tricky to figure out: Every linedef has a small notch in the middle of it. This notch is always facing to the right of the linedef. That means that if you have a notch facing east, your linedef is facing north.

If you have multiple scrolling sectors after another that are supposed to carry the player, you should check the Not Climbable on the control linedefs. Then any neighboring scrollers are grouped together as if they were one. This prevents the player from being pushed slightly faster over sector borders.

Conveyor belt visuals

Typical conveyor belts such as the ones seen in Techno Hill Zone use the flats THZFLR16 or THZFLR17. THZFLR16 is designed for conveyor belts going north/south, and THZFLR17 is designed for conveyor belts going west/east. Another option is CONVEY1 (north/south) or CONVEY2 (west/east).

When making conveyor belts that have a higher floor height than the sector(s) around them, it is a good idea to use THZCONV1, THZCONV2, and THZCONV3 as linedef textures. Those are the textures used in Techno Hill Zone Act 2 and most THZ-themed custom maps that look like the ending and middle parts of a real conveyor belt. For an example of how they look, and how to set them up, try the example WAD that can be found at the bottom of the article.

Accelerative scrollers

Accelerative scrollers work differently from regular scrollers. Instead of continually scrolling at a fixed speed, they can accelerate and decelerate or even stop completely and reverse direction. These scrollers move according to changes made to the ceiling height of the control sector. The distance from the original height determines the speed of the scroller. With the use of linedef type 407, the ceiling can be raised gradually, which will speed up the scroller gradually. The higher the ceiling is in contrast to the floor, the faster the scroller will move. When the player is in a sector affected by a pushing or scrolling effect to its original height, the faster the scroller will move. By using linedef type 401 to instantly change the ceiling height, you can also modify the speed instantly instead of accelerating gradually. If you lower the ceiling below its initial height, the scroller will change direction.

Displacement scrollers

Displacement scrollers are controlled with distance rather than speed. Like accelerative scrollers, they move according to changes made to the ceiling height of the control sector, but the scroller only moves as long as the ceiling is being moved. For example, when the ceiling height is changed by one fracunit, the scroller will move by one fracunit. Thus, when used with linedef type 407, the speed of the ceiling movement determines the scroller speed, and once the ceiling stops moving, the scroller stops too. With linedef type 401, you can move the scroller instantly by a fixed value, but this is not recommended, since it has little practical usage.

List of scrollers

Wall scrolling

Plane scrolling

Samples

Sample 1

Example file: ex_ld502_scrollwall.wad (MAP01) 
  • This shows a horizontal wall scroller with adjustable speed.
How to use
  • You may load this file into your favorite map editor, such as Zone Builder. Select MAP01 as the map to load.
  • You may also load this file in the game:
    1. Save ex_ld502_scrollwall.wad into the addons folder of your SRB2 directory.
    2. Start SRB2, go to the Addons menu, and then select ex_ld502_scrollwall.wad.
    3. Start the game in Single Player mode.
    4. Press the Console button (~), and type in the command MAP MAP01 to access the example map.
  • When you load this file in the game, it replaces Greenflower Zone Act 1.

Sample 2

Example file: ex_ld506_scrolltexturebybacksideoffsets.wad (MAP01) 
  • This shows a diagonal wall scroller with additional starting offsets.
How to use
  • You may load this file into your favorite map editor, such as Zone Builder. Select MAP01 as the map to load.
  • You may also load this file in the game:
    1. Save ex_ld506_scrolltexturebybacksideoffsets.wad into the addons folder of your SRB2 directory.
    2. Start SRB2, go to the Addons menu, and then select ex_ld506_scrolltexturebybacksideoffsets.wad.
    3. Start the game in Single Player mode.
    4. Press the Console button (~), and type in the command MAP MAP01 to access the example map.
  • When you load this file in the game, it replaces Greenflower Zone Act 1.

Sample 3

Example file: ex_ld530_scrollfloortextureandcarryobjects.wad (MAP01) 
  • This shows four regular conveyor belts, each going into one horizontal direction.
How to use
  • You may load this file into your favorite map editor, such as Zone Builder. Select MAP01 as the map to load.
  • You may also load this file in the game:
    1. Save ex_ld530_scrollfloortextureandcarryobjects.wad into the addons folder of your SRB2 directory.
    2. Start SRB2, go to the Addons menu, and then select ex_ld530_scrollfloortextureandcarryobjects.wad.
    3. Start the game in Single Player mode.
    4. Press the Console button (~), and type in the command MAP MAP01 to access the example map.
  • When you load this file in the game, it replaces Greenflower Zone Act 1.

Sample 4

Example file: ex ld531 scrollfloortextureandcarryobjects accelerative.wad (MAP01) 
  • This shows an accelerative conveyor belt that can be moved into both directions and sped up with the use of arrow buttons.
How to use
  • You may load this file into your favorite map editor, such as Zone Builder. Select MAP01 as the map to load.
  • You may also load this file in the game:
    1. Save ex ld531 scrollfloortextureandcarryobjects accelerative.wad into the addons folder of your SRB2 directory.
    2. Start SRB2, go to the Addons menu, and then select ex ld531 scrollfloortextureandcarryobjects accelerative.wad.
    3. Start the game in Single Player mode.
    4. Press the Console button (~), and type in the command MAP MAP01 to access the example map.
  • When you load this file in the game, it replaces Greenflower Zone Act 1.

Sample 5

Example file: ex ld532 scrollfloortextureandcarryobjects displacement.wad (MAP01) 
  • This shows a displacement conveyor belt that can be moved into both directions with the use of arrow buttons.
How to use
  • You may load this file into your favorite map editor, such as Zone Builder. Select MAP01 as the map to load.
  • You may also load this file in the game:
    1. Save ex ld532 scrollfloortextureandcarryobjects displacement.wad into the addons folder of your SRB2 directory.
    2. Start SRB2, go to the Addons menu, and then select ex ld532 scrollfloortextureandcarryobjects displacement.wad.
    3. Start the game in Single Player mode.
    4. Press the Console button (~), and type in the command MAP MAP01 to access the example map.
  • When you load this file in the game, it replaces Greenflower Zone Act 1.