Synchronizing sector and line scroll speeds
Posted: Fri May 10, 2019 11:23 pm
I'm sure there have been at least some mappers who have wanted to synchronize the scroll speeds between walls and flats in order to create the illusion of the player being on a subway, train or some other kind of moving vehicle.
You may have thought that you could just assign the same numbers to Scroll_Texture_Left/Right/Up/Down and/or Scroll_Floor/Ceiling, but you found that when you did so, your flats and walls were scrolling at different speeds! I think these gotchas are some of those relics of ZDoom's history.
So this tutorial explains how to set up scrolling so that your walls and flats move at the same speed.
First of all, you'll need a "base speed", like 5. I think this is the amount of pixels the wall or flat will scroll each tic.
For Scroll_Texture_Left/Right/Up/Down:
For Scroll_Wall, the x and y values are given in fixed point, so just multiply the base speed by 65536:
Note that assigning a line the Scroll_Wall special does not immediately start scrolling the wall, unlike Scroll_Texture_Left/Right/Up/Down, so you'll need to use the special on a wall with a switch, or an ACS script.
For Scroll_Floor and Scroll_Ceiling:
You may have thought that you could just assign the same numbers to Scroll_Texture_Left/Right/Up/Down and/or Scroll_Floor/Ceiling, but you found that when you did so, your flats and walls were scrolling at different speeds! I think these gotchas are some of those relics of ZDoom's history.
So this tutorial explains how to set up scrolling so that your walls and flats move at the same speed.
First of all, you'll need a "base speed", like 5. I think this is the amount of pixels the wall or flat will scroll each tic.
For Scroll_Texture_Left/Right/Up/Down:
Code: Select all
arg0 = base speed * 64Code: Select all
x = base speed * 65536
y = base speed * 65536For Scroll_Floor and Scroll_Ceiling:
Code: Select all
xMove = base speed * 32 + 128
yMove = base speed * 32 + 128