Improve frame skips when input queue gets filled #26
Labels
animation
anything that can help create animations or make better animations in a game
feature
New feature or request
games
Concerns the games: exported, gist-loaded, or played in the editor.
input
keyboard, mouse, touch, ... devices, gameplay and accessibility
polish
Make the games or editor behave/look better
question
Further information is requested
syntax/language
Concerns the language or its syntax
This is a common technique in turn-based games to improve game feel in general and responsiveness in particular: when the player presses keys faster than the feedback animations can play, store the inputs in a queue, and if the queue gets too big, shorten the animations, or even skip them completely.
The difficulty in doing something similar in Pattern:Script is that PuzzleScript does not have a proper concept of animation frames and we need to use
again
orreal_time
to simulate them, but by definition, inputs are forbidden duringagain
frames, which also prevent ticks fromreal_time
. So, the player would have to use real_time, avoid usingagain
, and manually interrupt/shorten animations if a new input is triggered (which is often quite easy to do and can even be done without the game dev realizing it). But queuing the inputs require more explicit work from the dev. Also, some game devs could perceive switching to a real time game as a huge step in increased complexity.My idea is that I could pre-compute some number N of
again
frames in advance and reduce theagain_interval
according to some function of the input queue size. Or something like that. I may also have to add new commands likeskipable
so that devs can specify that the frame in which the command is triggered can be skipped if needed.This is also something that has to be done for undos if I decide to animate them (see #23).
The text was updated successfully, but these errors were encountered: