baja blast rd. Posted September 4 This tutorial is about Boom's displacement scrollers (particularly actions 247/248, which move objects on the scrolling surface). It assumes that you have some comfort with Boom's static scrollers -- the basic action 252/253 ones that you might use with voodoo doll scripts. If you don't know anything about static scrollers, first learn about those. Preferably build some comfort using them. It is far easier to learn how displacement scrollers work by building on that prior knowledge. (Optional refresher on how static scrollers work) Spoiler A static scroller that moves objects is created by giving a linedef the action 252 or 253 (that is the control linedef). The control linedef is given a tag. All sectors in the map with that same tag will scroll. Scrolling speed is proportional to the length of the control linedef. For technical reasons beyond the scope of this post, avoid using scroller control linedefs much shorter than 32 map units (32 is not the exact minimum but it's easy to remember). A quick tip to determine the scrolling angle: mentally rotate the linedef's front side (or the sticking-out 'nub') counterclockwise by 90 degrees (3 hours), and that's the scrolling angle. Action 252 makes objects scroll but not the floor texture. Action 253 makes objects and the floor texture scroll. (How do displacement scrollers work?) Conceptually, a displacement scroller is very much like the familiar static scroller, with one major difference. Scrolling only happens when the control sector is moving. (The control sector is the sector on the scrolling action linedef's front side. "Moving" means the sector's floor or ceiling is either raising or lowering.) When the control sector is stationary, there's no scrolling happening. Effectively, displacement scrollers operate much as "temporary scrollers." image 1-1: a shitty illustration To use a displacement scroller to push objects, instead of using action 252 or 253, you'll use action 247 or 248 ("Scroll (Floor/)Move Things When Sector Changes Height"). When you want scrolling to happen, you will trigger the control sector to move in some way -- like by raising its ceiling, lowering its floor, treating it as a lift, etc. The player can trigger that movement directly via walkover/switch/shootswitch, or a voodoo doll script can be used to do it, or...you have a lot of options here. The scrolling will mirror the movement of the control sector. For example, a crushing ceiling lowers and raises cyclically. A displacement scroller with a crusher as its control sector will scroll one direction, then the other direction, continuously, with the same rhythm as the crusher. When the crusher stops, scrolling will stop. That's all you really need to know to begin playing around with them. (A simple example wad) Here is an example wad. ds.zip map01 contains a setup that makes a BFG, cells, and monsters scroll off of a ledge. When you hit the COMPBLUE switch, the control sector's ceiling raises for a short time, and while that is happening the ledge is scrolling. As this setup does, displacement scroller setups will often involve drawing at least one sector next to the control sector (which is a small triangle here). That sector is drawn so that we can properly guide the control sector's floor or ceiling to a specific chosen height. That helps us modulate how long the control sector spends moving. (That sector isn't needed for some ways of moving the control sector, like crushers -- but I find it more flexible than trying to stick exclusively to actions that don't need it.) If you want to see the cause-effect more clearly, the optional map02 is the same exact setup -- except that everything is visible from the map, including the scroller contraption (which is decorated in FIREBLU). (Why would you ever want to use a displacement scroller?) Spoiler You're the one who decided to read this, why do you want to use them?! Like most tools, you start having ideas for once you have it in your toolkit. A few examples: - Dannebubinga uses displacement scrollers in Sunlust at various points to teleport "bait" weapons around. - In a map I worked on with Scotty, there's a setup that used a scroller to fling teleporting kamikazes into an arena, but since the surface they needed to teleport onto was accessible earlier, it had to be a temporary scroller. - In another setup, I used them to very gently nudge zombies/chaingunners off of teleport pads so that they teleported in more smoothly (for aesthetic reasons I couldn't add more teleport destinations). It's not hard to imagine puzzles or contraptions that involve using them that would be difficult to design otherwise. There's lots of possibilities, both practical and fanciful. (Technical know-how: What determines the direction of scrolling?) Spoiler A displacement scroller scrolls the exact same direction a static scroller would if the moving surface is increasing in height -- for example a raising floor or ceiling. If the moving surface is decreasing in height, the scrolling direction is reversed by 180 degrees. The above assumes that only the floor or ceiling are moving, not both. Both moving at once seems to make odd things happen so I would not suggest it. (Technical know-how: What determines the speed of scrolling?) Spoiler First off, playing it by ear is very possible! I didn't learn the exact details until I used displacement scrollers a handful of times. Scrolling speed is proportional to the length of the control linedef *and* the speed that the control sector is moving. The simplest practical way to understand the speed you get is by thinking of it in relation to static scrollers. If you operate the control sector as a floor, ceiling, lift, or crusher that moves at speed Slow -- which will move it at 1 unit per tic -- the scrolling speed will be identical to the equivalent static scroller setup. (1 unit per tic = 1x.) Equivalent means the same control line length (for example 32 units for both). Normal/Fast/Turbo, which move at 2/4/8 units per tic, would result in a scrolling speed 2x/4x/8x that of the static scroller setup. Doors happen to move twice as quickly as those other actions. For those, Slow/Normal/Fast/Turbo would result in a scrolling speed 2x/4x/8x/16x that of the equivalent static scroller setup. (Technical know-how: What are the different displacement scroller actions, and which ones should we use?) Spoiler The displacement scrollers that move floors are 246 "Scroll Floor when Sector Changes Height" 247 "Scroll Move Things when Sector Changes Height" 248 Scroll Floor/Move Things when Sector Changes Height" which are counterparts to the static scrollers you might be already familiar with 251 "Scroll Floor according to Line Vector" 252 "Scroll Move Things according to Line Vector" 253 "Scroll Floor, Move Things" The duos of actions 246/251, 247/252, and 248/253 play the same role: - Both of 246/251 scroll the floor texture, but don't push any things on the floor. For functional uses of displacement scrollers, we don't want that. - Both of 247/252 leave the floor texture unchanged, and push things. - Both of 248/253 scroll the floor texture and push things. For offmap applications where you can't see something scroll, there's not a big difference. I personally prefer action 248 because it makes it easier to debug -- if I mistaken apply the tag to a sector in the map itself, a sector scrolling that shouldn't is somewhat harder to miss. When the scrolling sector is the playable/visible part of the map, it comes down to whether you're designing a construct that should visibly scroll its floor texture (like a factory's assembly line conveyor belt) or not. The full Boom Reference describes other scroller linedef types. (A bonus "puzzle") As a final example, I made an easy little puzzle speedmap in Boom format. I mean MBF21... Lure the cyberdemon into the killfloor pit without accidentally making it teleport. ds2.zip (cl21 / MBF21 compat) 17 Share this post Link to post
wasdbee Posted October 3 Amazingly useful guide, ty! One thing that I've not seen done before (although maybe it has been done loads and I just haven't noticed) is using displacement scrollers to align textures; You can use them to essentially emulate the flat alignment capabilities of more advanced UDMF engines in Boom/MBF21. I included a Boom/MBF21 example wad of a 256 unit wide room with a teleport gate slightly above the middle on the vertical axis, so that it aligns with the 64x64 flat grid, but exactly in the middle on the horizontal axis, so that it's cut in half. Using a 16 unit tall control sector with a displacement scroller that only scrolls floors, it can be scrollled to look correct! I've not played with the concept that much yet, but it seems kinda useful in general, and could lead to some interesting creative uses (animated flats in particular can become wonderfully cursed). You could even make the equivalent of textures that have a bunch of different switches on and rely on texture alignment to display properly, but as a flat. flatalignment.zip 1 Share this post Link to post
Worm318 Posted October 4 Thanks for this thread. I read it just today and for this year NaNoWadMo, I'm doing 2 hour speedmaps picking themes at random and I got "No movement. Turn, use and shoot only". I used conveyor belts for granting the player items and to activate things while moving the player upwards. 2 Share this post Link to post