Switching switches has too much delay in single-step mode

Found a bug in R'n'D? Report it here!

Moderators: Zomis, Flumminator

Post Reply
Posts: 108
Joined: Thu Jul 12, 2018 12:59 am

Switching switches has too much delay in single-step mode

Post by ncrecc » Thu Jan 17, 2019 3:48 am

When you're playing a level in single-step mode, if you switch a switch (e.g. conveyor belt lever, magic ball switch, or switch door switch), you have to wait some arbitrary amount of time before you can switch that switch again; unless you move (not just snap, actually move) against a solid object that is not the level border (possibly related), in which case the delay is cancelled and you can immediately switch the switch again. But when you're playing a level in real time, there's no delay to speak of except for how fast you can mash your finger against the keyboard.

Posts: 326
Joined: Wed Oct 30, 2013 5:32 am
Location: Russia

Re: Switching switches has too much delay in single-step mode

Post by Eizzoux » Thu Jan 17, 2019 1:12 pm

Well, if you started the topic about "Switches", I have something else interesting I found, like, four years ago.
There's actually another problem with these specific switches: If you put two "custom elements" with switching functions (Switched by player) located diagonally so you can switch both of them without moving (except opposite sides from each other), then hold on both of them and you'll be switching them horrendously fast, but that doesn't work with pair of basic switches like conveyor belt switches because they're locking your direction on switching until you release. That issue also works if one of switches is custom, but other one is one of basic ones, so switchgates will be endlessly playing closing/opening sequence or conveyor belts will be spazing out, while you're destoying the switches.
Yeah, video again...
Nothing in here...*

Posts: 45
Joined: Thu Mar 27, 2008 4:45 am

Re: Switching switches has too much delay in single-step mode

Post by Anonycat » Sat Jan 19, 2019 1:22 am

Specifically, after you activate a switch, there has to be at least one intervening frame in which your input is exactly 0x00 (nothing) before you're allowed to activate the switch again. The trouble here is that default RND gives you no way to input a 0x00 in single-step mode; you can simulate it for most purposes by pressing the snap key and nothing else to advance a frame, but that counts as an input value of 0x10, which isn't the same as 0x00, so it isn't good enough here.

What I ended up doing is editing my personal installation to include a keybinding for "step frame without input", which allows me to send exactly one frame of 0x00 and stay paused after that, so it hasn't been an issue in years. Here you can see the effects of that in a tape.
Niko Böhm tutorial tape, level 33
(416 Bytes) Downloaded 41 times

User avatar
Site Admin
Posts: 3343
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany

Re: Switching switches has too much delay in single-step mode

Post by Holger » Mon Jan 21, 2019 8:37 pm

Some notes on switches in single-play mode: As far as I can see (tested with release version and level 033 from "Niko Böhm's Tutorial" level set), you have to wait for seven frames before you can switch a switch again. But these "waiting frames" don't have to be completely empty actions (input of 0x00, which indeed cannot be entered in single-step mode), but can, for example, be snapping input without direction (if activating the switch by snapping it, it has to be at least "no snapping" for one frame, to end the previous snapping action). So you can effectively use a switch every eight frames (which goes along with moving one tile in eight frames at normal speed).

But then, this seems to be a compatibility setting for these (relatively old) tutorial levels. Open the above level in the editor and change at least one tile (marking it as "to be played with latest settings"), then play in single-step mode (after starting it from the editor). Now you can switch a switch every two frames (for example, by alternating keys "right" and "snap").

Eizzoux: Haven't tested that "super speedy switching switches" observation now (which apparently is not related to single-step mode)...

Post Reply