vicgeralds / vitetris

Classic multiplayer tetris for the terminal
BSD 2-Clause "Simplified" License
208 stars 29 forks source link

FR: Would love for autorepeat to not be interrupted by pressing another key #8

Open joemaro opened 5 years ago

joemaro commented 5 years ago

Hi!

input with the keyboard in text-areas and in the terminal as well is configured to work the way, that when i hold one key and at some time press another, the first key stops repeating when pressing the second key. I will now hold s and at some point press and release n, but i will not release s: sssssssssssssssssssssssssssssssssssssssssn

the way it works in Tetris and Console games in general is that this autorepeat is NOT stopped by pressing a second key. Doing the same as above would result in: ssssssssssssssnssssssssss..... Without this, i see no real point in playing tetris because that means you cannot rotate pieces while you move them sideways, you can either rotate OR move (when usually you do both at the same time, that's where the "flow" so to speak comes from).

Vitetris, as amazing as it is, will not be used by "professional" tetris-players because of that input flaw.

i'm not a programmer, so i don't know how hard it is to implement this, but i guess one has to program a way to get the keyboard input without using the 'common' way, which the terminal usually uses.

Anyway, thanks for all your efforts & feel free to disregard my comment if you think this is just too much of a hassle.

Regards Joe

vicgeralds commented 4 years ago

I agree that this is an annoying limitation of terminal games. Still, the main point of vitetris is to be a portable terminal application, so I don't see how keyboard input can be handled the expected way without resorting to hacks for specific environments or setups.

There is one option though that might work for some users: Build vitetris with Allegro 4.2. I think vitetris should then have the expected keyboard handling.

joemaro commented 4 years ago

IIRC i tried building it with allegro back in the days and can confirm that it indeed works as a tetris game should work.