ainslec / adventuron-issue-tracker

Adventuron Issues Tracker
4 stars 0 forks source link

Press_any_key accepts inputs even if paused prior. #288

Open samcambolt270 opened 3 years ago

samcambolt270 commented 3 years ago

If you have a subroutine or pause function before a "Press_any_key" function, the press_any_key will accept any and all button presses made during the pause/subroutine. I've tested this by having a long pause followed by numerous lengthy subroutines before dozens of press_any_key functions, and if you press a key 5 times even during the first pause, each press is buffered when the pause and subroutines end going through the press_any_key functions as many times as you pressed a key during the pause. Following is some (admittedly passive aggressive) code that demonstrates this.

start_at = Room on_startup {

: print "this program is designed to demonstrate the keypress buffer issue. There will be a 5000 millisecond (5 second) pause function followed a number of 'press_any_key' functions. While the following screen is up, the program will buffer any clicks, taps or enter presses that you make and spam through screens. If 'Begin pressing now' is on the screen, please spam click, tap, or press enter a few dozen times for the demonstration to work." ; :pause "2000"; :print "Begin pressing now"; :press_any_key; :clear_screen; :print "The program is now buffering all of your inputs and will accordingly spam through any text you intended the player to see."; :pause "5000"; :clear_screen; :press_any_key; :clear_screen; :print "Theres an important hint on this screen!"; :press_any_key; :clear_screen; :print "Here's some character developement you'll never read"; :press_any_key; :clear_screen; :print "Here's some worldbuilding fo... Nope, this is gone too!"; :press_any_key; :clear_screen; :print "Gosh Golly gee. The author spent so much time writing all this wonderful world building and it's just getting spammed through by the input buffer bug."; :press_any_key; :clear_screen; :print "If you followed the directions, you shouldn't see this text for more than a frame or two"; :press_any_key; :clear_screen; :print "It's still going. So how was your day?"; :press_any_key; :clear_screen; :print "Oh, you didn't see my question cause the computer was skipping all the text?"; :press_any_key; :clear_screen; :print "How disapointing."; :press_any_key; :clear_screen; :print "Hopefully this bug gets fixed soon."; :press_any_key; :clear_screen; :print "This the tenth screen of text that, if you followed the directions, you won't see."; } locations { Room : location "Assuming this screen appeared right after the timer ended, then that means you pressed something at least ten times and now the game has spammed through all the text. It would sure suck if this were a real story, because all that text that just got skipped (there was a good bit of it) could have been important and you can't go back to read it without restarting.";

}

ainslec commented 3 years ago

Related to issue #283