Zoom tube tutorial

From SRB2 Wiki
Jump to: navigation, search
Player spinning through a zoom tube.

This tutorial teaches you how to set up zoom tubes. A fully working zoom tube consists of several components: The Zoom Tube Start and Zoom Tube End sector specials define the entrance and exit to a zoom tube. Zoom Tube Waypoints determine the path of the zoom tube and are placed at every turn. The Zoom Tube Parameters linedef special (linedef type 3) tells the game which components belong together to form a zoom tube and determines the speed that the player travels at.

Zoom tube start and end

Zoom Tube Start (selected; highlighted red) and Zoom Tube End (pointed at; highlighted yellow) sectors.

These sector specials define the start and end of a zoom tube. Both sectors should have the same tag. When a player enters a sector with either special, they are forced into a spin and start traveling along the waypoint sequence. Note that a zoom tube can be traveled through in both directions – the Zoom Tube Start makes the player traverse the zoom tube from the first waypoint to the last, while the Zoom Tube End makes the player traverse it from the last to the first. If you want to make a one-way zoom tube, simply leave out the Zoom Tube End sector.

Zoom tube waypoints

Pointed at zoom tube waypoint Thing. It is invisible in-game, but is shown in Zone Builder.

These tell the game where the zoom tube goes by making the player spin from waypoint to waypoint until the last one is reached. They are set up using two parameters: The sequence number groups multiple waypoints into one zoom tube, and the waypoint number determines the order they are traveled through. In other words, if you have two zoom tubes, each of them should have a different waypoint sequence, and each waypoint in either sequence should have a different waypoint number. If you enter a zoom tube, the player will be transported to the waypoint in the sequence with the lowest waypoint number, then to the one with the next-lowest, and so forth. Waypoints with a different sequence number will be ignored entirely.

Both values are specified using the Angle of the waypoint Thing: The sequence number is multiplied by 256, and the waypoint numbers are simply added on top of that. Both values start with 0, so the first waypoint in the first sequence would have an Angle of 0. For each consecutive waypoint, add 1 to the Angle. If you want to make a second zoom tube, start with an Angle of 256, then continue with 257, 258 and so forth. A third zoom tube would start at 512, a fourth one with 768, and a tenth one with 2304 (which is calculated as (10-1)×256).

Zoom tube parameters

Zoom tube parameters Linedef (Linedef type 3) pointing at corresponding zoom tube start and Zoom Tube end sectors.

The linedef special with linedef type 3 assigns the sector specials to the waypoints and specifies the speed. Set it up by making a control sector and giving one of its linedefs a type of 3. The tag should be the same as the tag used for the sector specials. The front texture X offset determines speed, the Y offset should be the sequence number.

Sample

Example file: ex_ld003_zoomtubeparameters.wad (MAP01) 
  • This map contains two separate zoom tubes. One is a regular ground-based zoom tube, while the other is floating freely in the air with the use of an intangible FOF.
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_ld003_zoomtubeparameters.wad into the addons folder of your SRB2 directory.
    2. Start SRB2, go to the Addons menu, and then select ex_ld003_zoomtubeparameters.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.