{"action":"created","issue":{"url":"https://api.github.com/repos/crawl/crawl/issues/454","repository_url":"https://api.github.com/repos/crawl/crawl","labels_url":"https://api.github.com/repos/crawl/crawl/issues/454/labels{/name}","comments_url":"https://api.github.com/repos/crawl/crawl/issues/454/comments","events_url":"https://api.github.com/repos/crawl/crawl/issues/454/events","html_url":"https://github.com/crawl/crawl/pull/454","id":207383982,"number":454,"title":"Add a noise meter to the HUD","user":{"login":"rawlins","id":6290753,"avatar_url":"https://avatars.githubusercontent.com/u/6290753?v=3","gravatar_id":"","url":"https://api.github.com/users/rawlins","html_url":"https://github.com/rawlins","followers_url":"https://api.github.com/users/rawlins/followers","following_url":"https://api.github.com/users/rawlins/following{/other_user}","gists_url":"https://api.github.com/users/rawlins/gists{/gist_id}","starred_url":"https://api.github.com/users/rawlins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rawlins/subscriptions","organizations_url":"https://api.github.com/users/rawlins/orgs","repos_url":"https://api.github.com/users/rawlins/repos","events_url":"https://api.github.com/users/rawlins/events{/privacy}","received_events_url":"https://api.github.com/users/rawlins/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-02-14T00:42:45Z","updated_at":"2017-02-14T02:19:04Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/crawl/crawl/pulls/454","html_url":"https://github.com/crawl/crawl/pull/454","diff_url":"https://github.com/crawl/crawl/pull/454.diff","patch_url":"https://github.com/crawl/crawl/pull/454.patch"},"body":"Noise is one of the more complicated systems in dcss, yet it's barely\r\nrepresented in the UI.  This is partly because there's just so much\r\ninformation to represent.  This commit attempts to partially solve this\r\nproblem by providing a very simple UI element that summarizes noise\r\nheard by the player during the last turn in the form of a meter.  This\r\nmeter peaks at the loudest noise audible at the player's position during\r\nthat turn, and will switch between several different colors (details\r\nvary slightly for different interfaces), described below.  I chose to\r\nuse sound that has propagated to the player, so more distant events will\r\nbe attenuated by distance and dungeon features -- the idea is to give a\r\nmeasure as to how likely things are to move towards the player's\r\nposition.\r\n\r\nWhile experienced players may have internalized a lot of this, most of\r\nthis information is not at all apparent to less experienced players, and\r\nI think this UI element is potentially extremely useful (as opposed to\r\nclutter).\r\n\r\n1. lightgray: the noise level at the player's position is within a range\r\nthat makes it unlikely to propagate outside the player's los (though\r\nthis can happen depending on terrain).  Or more simply: this noise is\r\nprobably basically ok.  Most low-medium melee damage is in this\r\ncategory, as are most low-damage spells.\r\n\r\n2. yellow: the noise heard at the player's position is likely to\r\npropagate outside the player's los, up to twice the los radius.  Or more\r\nsimply: this noise is bad.  Shouting, distant fireballs, high damage\r\nmelee attacks, high damage spells (e.g. many bolt spells), door creaks\r\nare in this category.  longbows and bigger crossbows are on the border\r\nof this category.\r\n\r\n3. red: the noise is like to be heard at a substantial distance, on an\r\nopen level more than 2x the los radius.  Or more simply: this noise is\r\nvery bad.  This category includes howler monkeys, lightning bolt, nearby\r\nfireballs, qazlal at pieties above ****.  (Though thunder clouds may\r\nrandomly produce red noise at nearly any piety.)\r\n\r\n4. lightmagenta: these sounds are off the meter, the loudest sounds you\r\ncan make.  Includes: shatter, gong, ood collision, orb apport/pickup\r\n\r\nPotential issues/complications:\r\n\r\n* The above categories could be tweaked or added to.  How they use\r\nthe meter could also be tweaked.  (Loudness maps linearly onto the\r\nmeter so about half of it is occupied by red.)\r\n* This implementation uses a heuristic for branch noise adjustment\r\nthat is kind of hacky.  A better (but much more complicated) solution\r\nmight be to sample noise at various distances directly from the noise\r\ngrid.  Right now I just use a constant addition or subtraction to model\r\nthe effects of branch noise; in e.g. shoals or crypt this will push\r\nsome of the category boundaries for colors around.\r\n* An alternative approach would be to not use attenuated noise at all,\r\nbut find the loudest noise (before propagation) in the player's los.\r\n* This implementation doesn't save the noise state, so it isn't displayed\r\nafter loading.\r\n* In wizmode there is also a numeric version of the meter displayed,\r\nbut I decided this is too uninterpretable to be useful to players.\r\n(But, the heuristic for normal noise branches is: in a completely open\r\narea a sound of loudness l will propagate approximately l/.85 spaces.)\r\n* exposing this to the player may reveal some cases where it is not\r\nentirely intuitive that no sound is made.  For example, berserking is\r\nsilent (but unstealthy) except when opening doors."},"comment":{"url":"https://api.github.com/repos/crawl/crawl/issues/comments/279587783","html_url":"https://github.com/crawl/crawl/pull/454#issuecomment-279587783","issue_url":"https://api.github.com/repos/crawl/crawl/issues/454","id":279587783,"user":{"login":"rawlins","id":6290753,"avatar_url":"https://avatars.githubusercontent.com/u/6290753?v=3","gravatar_id":"","url":"https://api.github.com/users/rawlins","html_url":"https://github.com/rawlins","followers_url":"https://api.github.com/users/rawlins/followers","following_url":"https://api.github.com/users/rawlins/following{/other_user}","gists_url":"https://api.github.com/users/rawlins/gists{/gist_id}","starred_url":"https://api.github.com/users/rawlins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rawlins/subscriptions","organizations_url":"https://api.github.com/users/rawlins/orgs","repos_url":"https://api.github.com/users/rawlins/repos","events_url":"https://api.github.com/users/rawlins/events{/privacy}","received_events_url":"https://api.github.com/users/rawlins/received_events","type":"User","site_admin":false},"created_at":"2017-02-14T02:19:04Z","updated_at":"2017-02-14T02:19:04Z","body":"Also, I made a short screencast of me putting the noise meter through its paces in local tiles, here:\r\n\r\nhttps://www.dropbox.com/s/xn1s2co3um3617q/noisemeter_screencast.mov?dl=0\r\n\r\n(Note that this was done in wizmode, so the number you see next to \"Noise:\" isn't normally displayed.)"}}
{"actor":{"display_login":"rawlins"}}