Mashing the click

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

Moderators: Flumminator, Zomis

Post Reply
User avatar
SLAPPYHAPPY2000
Posts: 110
Joined: Wed Jun 03, 2020 10:27 am

Mashing the click

Post by SLAPPYHAPPY2000 »

Not sure if this is a bug or just something, but when you mash the button on a title screen (say you click 5 times instead of 1 time on a single title card), the clicks actually register for as many future actions as buttons pressed. You can't register any other inputs until the clicks finished, except for more clicks I think. So, if you mash in a title screen and then realized it would be better to press escape, you're basically screwed! It really sucks for an impatient fool like myself, and while the simpler alternative is to NOT MASH like a smart person, I think it would be nice to do something about this.
Thanks.
User avatar
armanelgtron
Posts: 29
Joined: Sat Jul 25, 2015 8:25 pm

Re: Mashing the click

Post by armanelgtron »

I'll assume the animations are the issue: If you want to minimize the time between screens, you can turn off fade screens and turn on quick menu doors in the graphics settings.

I believe the "solution" to ignoring clicks during animations would be to call the function to get SDL events during said animation, but don't actually do anything with them... but then you run into the potential issue of missing important events
Image
User avatar
Holger
Site Admin
Posts: 4073
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: Mashing the click

Post by Holger »

The phenomen you just encountered is called "event queue", and it's not a bug, but a feature. ;-)

But seriously: Yes, I already changed this behaviour once (and I still use a function "ClearEventQueue()" here and there, for example when customizing the keyboard and joystick controls and virtual buttons). The result was that, after fading screens, events like key presses and mouse clicks were removed from the event queue, just to prevent the behaviour you encountered (and dislike).

However, I changed that back very quickly, as it turned out that certain sensible actions were made impossible with that "convenience change". As an example, you can now start the game and quickly press some keys for the tape recorder to warp-forward the tape and go to pause mode a few seconds before the tape ends -- this is the usual action you want to execute after a sudden death, to replay and re-record a tape just before it ended with that sudden death. When clearing the event quere, you would have to wait for the game to start to inject your next keys.

Another common action is starting a new game and immediately go to pause mode, before even a single game frame was executed, by simply pressing "space" twice very fast in the main menu. In fact, this is very helpful for a number of EMC levels, which make some fun with immediately killing the player right after the level starts. Using immediate pause mode, you can see what's going on. But even worse: When clearing the event queue after starting the game, you will not have a chance to escape from that "sudden death" in the very first game frame! Some EMC levels indeed require stuffing in the first movement action into the event queue even before the game starts!

So we could limit clearing the event queue only for title screens, of course. That would prevent people from pressing "escape, space" to quickly skip the title screens and start the game, even though this might be less likely than the cases described before.

But then, why not simply press the "escape" key to skip all title screens? This works on all platforms (other than Android).

Using this, a (more or less) consistent behaviour can be used regarding (not) clearing additional events.
Post Reply