[Help] Key repeat

57 views
Skip to first unread message

BoredMatt

unread,
Feb 10, 2021, 4:28:14 AM2/10/21
to PuzzleScript
When holding an arrow key down, is there a way to have a delay between the first trigger and the next that is longer than key_repeat_interval ?
Like in a text editor, you can do individual presses to move one character at a time, but if you hold down it then accelerates.
I'd need that to be able to move fast and yet still be able to be exactly where I want or just be able to have my player face a specific direction without starting moving immediately.

Stephen Lavelle

unread,
Feb 10, 2021, 4:41:39 PM2/10/21
to Celine Liki, PuzzleScript
Apologies, I probably meant to reply all but hit the wrong button

Would that be difficult to implement ?
As a puzzlescript user it's not something I'd recommend tackling.  As a developer I don't want to - it's a very specific behaviour and I don't think I can fine-tune it well for general games, and the complexity of consideration isn't something I'd want to expose makers of puzzlescript games to.



Am Mi., 10. Feb. 2021 um 20:05 Uhr schrieb Celine Liki <celin...@gmail.com>:
Was this answer supposed to be private ? ;)
Thank you for answering anyway.
This is pretty much standard behaviour to have a  delay before the repeat triggers when holding down a key, though I can see why you wouldn't want it in some games. Would that be difficult to implement ?

(Sorry if you receive this message twice, there has been a slight mishap).

Le mer. 10 févr. 2021 à 11:49, Stephen Lavelle <anal...@gmail.com> a écrit :
> is there a way to have a delay between the first trigger and the next that is longer than key_repeat_interval
nope

--
You received this message because you are subscribed to the Google Groups "PuzzleScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puzzlescript...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/puzzlescript/4abaa879-99e7-4357-b9f0-fe3d7d5c7428n%40googlegroups.com.

BoredMatt

unread,
Feb 11, 2021, 9:28:42 AM2/11/21
to PuzzleScript
I wasn't thniking about anything too complicated. Just a prelude property as a switch between the current mode and a mode with a fixed interval between the first trigger and the second ( key_repeat interval being used between the second and third and so on). Exactly as in a text editor. There isn't even a need to let the user choose the length of the interval since it would only be used to allow single key strokes even when key_repeat interval is set at a low value. Using the same value as the default one of key_repeat_interval would work just fine.
That would definitely be something simple for the game makers.
Now I definitely understand if it's not something you want to tackle, or if you want to keep PuzzleScript as simple as possible. It already offers great possibilities.

That Scar

unread,
Feb 14, 2021, 5:04:28 PM2/14/21
to PuzzleScript
On Windows, there are global keyboard settings called "character repeat delay" and "character repeat rate" - this would be just like that. You could set a number and, by default, the delay would be 0, like it is in all current puzzlescript games.
Now that I think about it, I sometimes wish to increase repeat rate but don't because then it makes tapping a single move hard. A delay would make single moves easy - after all, that's why the operating system has both of these settings.
Reply all
Reply to author
Forward
0 new messages