Improving disturbance

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • andrewdoull
    Unangband maintainer
    • Apr 2007
    • 872

    Improving disturbance

    Hi,

    I'm contemplating how to improve handling of disturbance in Unangband, and since this relates to Angband, I figured the development thread would be the best for this.

    Disturbance is used to identify when to interrupt continuous player actions. The basic disturbance causes the player to clear any repeated action (such as running, resting, tunnelling etc) and stop immediately when disturbed - this also applies to macros. There's also an advanced disturbance option, implemented in Sangband, which causes the player to flush keyboard input, and delay accepting input for a short period: this is used to try to save the player from holding down a key and dying due to actions being read from the keyboard buffer while the player is in a critical state.

    The problems I'm specifically trying to handle in Unangband, is a) stepping onto the store is disturbed by monster movement, and since entering the store is handled as a fake keypress, the player ends up not entering a shop - just standing on the entrance and b) handling disturbance correctly for recharging rods/artifacts.

    But it seems to me that disturbance is not implemented quite correctly in general - unfortunately the last time I worked on this problem, my laptop was stolen just before committing a large chunk of code on this.

    So rather than reimplement, I'd like to hear any feedback about what improvements could be made for handling disturbance.

    Regards,

    Andrew Doull
    The Roflwtfzomgbbq Quylthulg summons L33t Paladins -more-
    In UnAngband, the level dives you.
    ASCII Dreams: http://roguelikedeveloper.blogspot.com
    Unangband: http://unangband.blogspot.com
Working...
😀
😂
🥰
😘
🤢
😎
😞
😡
👍
👎