Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Vanilla

Reply
 
Thread Tools Display Modes
Old September 5, 2017, 23:41   #1
Sky
Veteran
 
Join Date: Oct 2016
Location: London-ish
Age: 50
Posts: 2,137
Sky is on a distinguished road
stop Angband from stacking commands

ok, i got to post this knowing what world of hurt will come out of it.

we need to stop the game from stacking / queuing commands; or in other words, when i take the finger off a button, it can not perform any other commands.

let's say i'm a Mage cleaning up a room of hounds - nothing even worth mentioning, just waltz in and hold whatever button is your Acid Bolt spell.

i kill the last hound, stop casting, and there's another dozen or so spells queued up that are cast to nothing.

(i was just doing a bit of flair there, it's not targeted spells that do this, only directional spells)

However, this applies to just about anything else, i really want only one command to be stored at any time.

double taps / holding a button for too long can too many times result in unjustified deaths. I don't think the UI should punish the player for the ergonomics he uses in game, but rather for his ingame decisions. If anything, the UI should help the player play the game, not set traps for him.
__________________
"i can take this dracolich"
Sky is offline   Reply With Quote
Old September 6, 2017, 00:53   #2
Derakon
Prophet
 
Derakon's Avatar
 
Join Date: Dec 2009
Posts: 9,022
Derakon is on a distinguished road
Holding buttons down is going to get you killed, even if the game doesn't queue up commands, simply because something is going to come storming in while you're holding that button down, and kill you before you release it.

So basically, from my perspective what you're saying is equivalent to "I use a blender with the lid off to make my smoothies, but it makes an awful mess. It shouldn't make that mess." The solution is to put the lid on the blender, not to make a smarter blender.
Derakon is offline   Reply With Quote
Old September 6, 2017, 10:39   #3
Sky
Veteran
 
Join Date: Oct 2016
Location: London-ish
Age: 50
Posts: 2,137
Sky is on a distinguished road
but i am specifically speaking about commands that happen AFTER you have released a button. i have a setting for delay, i can tweak that. no need to patronize me when there is an aspect of the game that should clearly not be happening.

also, i'm kind of tired of hearing "holding buttons down" when the game is built in a way where it's begging you to hold buttons down.
__________________
"i can take this dracolich"
Sky is offline   Reply With Quote
Old September 6, 2017, 11:40   #4
AnonymousHero
Veteran
 
AnonymousHero's Avatar
 
Join Date: Jun 2007
Posts: 1,391
AnonymousHero is on a distinguished road
Quote:
Originally Posted by Sky View Post
but i am specifically speaking about commands that happen AFTER you have released a button. i have a setting for delay, i can tweak that. no need to patronize me when there is an aspect of the game that should clearly not be happening.
FWIW, I didn't see anything patronizing in Derakon's comment. I think you may be taking thinks a little too personally.

Quote:
Originally Posted by Sky View Post
also, i'm kind of tired of hearing "holding buttons down" when the game is built in a way where it's begging you to hold buttons down.
You can use Shift+Arrow (aka "running") to avoid a lot of that. If you're already using running, then I may not be understanding what you want -- the later levels will kill you if you hold buttons down -- even if you configure a 5 second delay between 'actions'.
AnonymousHero is offline   Reply With Quote
Old September 6, 2017, 12:01   #5
Huqhox
Adept
 
Huqhox's Avatar
 
Join Date: Apr 2016
Age: 53
Posts: 144
Huqhox is on a distinguished road
I think there are two issues here.

Firstly holding down a button being a good way to get killed. I don't think anyone is disputing that (although I learnt it the hard way). I use run to avoid the problem on movement and make attacks discrete button presses, which is just how I have always done it.

The second issue is that holding down a command key in Angband puts multiple commands into the input buffer; this is really a side effect of the way the input handling has been written and is a legacy of C input handling. Angband isn't the only game that suffers from this. I think what Sky is trying to say is that maybe when a key is reased the input buffer should be purged. Obviously this might have a bearing on how macros are handled and might not be easy to do. But I think there is a valid point that the game shouldn't continue to process actions if the key is not currently being pressed.
__________________
"This has not been a recording"
Huqhox is offline   Reply With Quote
Old September 6, 2017, 12:38   #6
PowerWyrm
Prophet
 
PowerWyrm's Avatar
 
Join Date: Apr 2008
Posts: 2,954
PowerWyrm is on a distinguished road
If you macro your Acid Bolt spell with [Escape]m3h', you can interrupt the extra castings with any key.
__________________
PWMAngband variant maintainer - check http://powerwyrm.monsite-orange.fr (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!
PowerWyrm is offline   Reply With Quote
Old September 6, 2017, 13:07   #7
Sky
Veteran
 
Join Date: Oct 2016
Location: London-ish
Age: 50
Posts: 2,137
Sky is on a distinguished road
i have my keyboard set up with fast repeats; i need this otherwise in work and other games (Quake, mostly) so i'm not going to build a .bat to change it every time. other people who type a lot would probably have the same, i'm not talking about some ridiculous regedit with millisecond repeats, just set on Fast rather than Medium. keeping a key down has a very broad definition, and while in some cases i might do that (clearing a slime pit with MM) in other instances it's simply being too slow on releasing a key.

there is no good reason why the game needs to queue commands - it would work identically without it. it's just old coding from the 80s that could easily* go away.
__________________
"i can take this dracolich"
Sky is offline   Reply With Quote
Old September 6, 2017, 14:24   #8
kandrc
Swordsman
 
Join Date: Dec 2007
Posts: 299
kandrc is on a distinguished road
Quote:
Originally Posted by Sky View Post
there is no good reason why the game needs to queue commands - it would work identically without it. it's just old coding from the 80s that could easily* go away.
The game does not queue commands. The keyboard driver queues keys so that the input is not lost if the system can't process the interrupts quickly enough. What you call "old coding from the 80s" is actually a very complicated problem. You can build a keyboard driver with unbuffered input, but then, when a cron job kicks off (or whatever the hell equivalent things happens in Windows land), you lose keys that you actually wanted buffered because you hit them correctly! Or you can configure your I/O library to discard buffered input when it pulls a single key code; this, in fact, leads to exactly the same problem. This type of "solution" can easily kill characters when the player literally did nothing wrong. And here you are, spouting nonsense about things you clearly don't understand, and claiming that fixing them is "easy", so that you can live through undisciplined fuck-ups of your own making.

Don't mash buttons. It's that easy.
kandrc is offline   Reply With Quote
Old September 6, 2017, 16:00   #9
Sky
Veteran
 
Join Date: Oct 2016
Location: London-ish
Age: 50
Posts: 2,137
Sky is on a distinguished road
you are telling me that

10 execute command
20 purge commands
30 goto 10

is too hard ?
__________________
"i can take this dracolich"
Sky is offline   Reply With Quote
Old September 6, 2017, 17:08   #10
Pondlife
Apprentice
 
Join Date: Mar 2010
Location: UK
Posts: 77
Pondlife is on a distinguished road
Could you flush the keyboard buffer before accepting command input with:

fseek(stdin,0,SEEK_END)
__________________
Playing roguelikes on and off since 1984.
rogue, hack, moria, nethack, angband & zangband.
Pondlife is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
stop *some* items from stacking Sky Vanilla 4 May 1, 2017 15:30
Stop the Hunger Clock bio_hazard Idle chatter 3 November 13, 2016 20:02
Will the TY curse ever stop? poschengbandplayer Variants 3 September 20, 2015 17:24
Sangband - Rest won't stop until hungry Bucolic Verdancy Variants 5 May 23, 2014 04:37
Bug: cannot stop editing keymaps jens Development 1 June 20, 2011 16:19


All times are GMT +1. The time now is 15:54.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.