Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Vanilla

Reply
 
Thread Tools Display Modes
Old March 29, 2011, 23:58   #21
Max Stats
Swordsman
 
Join Date: Jun 2010
Posts: 324
Max Stats is on a distinguished road
Quote:
Originally Posted by camlost View Post
Wasn't there a flow_by_sound option at some point in the past?
The "Monsters chase current location" birth option is called "birth_ai_sound" so the option is there, just by a different name.
Max Stats is offline   Reply With Quote
Old March 30, 2011, 00:20   #22
Mars
Scout
 
Mars's Avatar
 
Join Date: Apr 2007
Location: Netherlands
Posts: 31
Mars is on a distinguished road
Quote:
Originally Posted by fizzix View Post
Ah the importance of context. Without context...this quote is pretty amazing.
Nice catch
Mars is offline   Reply With Quote
Old March 30, 2011, 00:34   #23
camlost
Sangband 1.x Maintainer
 
camlost's Avatar
 
Join Date: Apr 2007
Posts: 522
camlost is on a distinguished road
Quote:
Originally Posted by Derakon View Post
We could, if we really wanted to, implement sound flows, such that sound wouldn't pass through stone (or only at a greatly reduced rate) and would decay properly with distance (i.e. the player not being equally loud when standing 2 tiles away with a wall in the middle as without). The main side-effect that I'd see would be that it'd become significantly more possible to crack open a vault without everything in it being awake. And of course sound processing would get more expensive, though I doubt it'd be a serious source of slowdown in this day and age.
How does this scale? How much of the dungeon should we process? Remember, just because we restrict monster processing to a certain number of squares (20?), doesn't mean that the sound getting to monsters closer than that could flow beyond and back.

Algorithmically, I'm guessing that we should just count stone as 5 blocks or something along those lines when calculating transmission of sound. Closed doors as 2.

----------------

Of course, this we might need to tweak the formula. If we want to keep net sneakiness the same, we'll want to make it harder to sneak by monsters in LOS.
__________________
a chunk of Bronze {These look tastier than they are. !E}
3 blank Parchments (Vellum) {No french novels please.}
camlost is offline   Reply With Quote
Old March 30, 2011, 01:10   #24
Zyphyr
Adept
 
Join Date: Jan 2008
Posts: 135
Zyphyr is on a distinguished road
Quote:
Originally Posted by camlost View Post
How does this scale? How much of the dungeon should we process? Remember, just because we restrict monster processing to a certain number of squares (20?), doesn't mean that the sound getting to monsters closer than that could flow beyond and back.
Initially assume a noise value of zero in all locations.

Start at @ and work outward with a base Noise level at @ determined by Stealth rating (possibly modified for certain action types - louder for digging/fighting, lower for resting). Each new ring gets the value of the highest adjacent cell, minus a number based on what the current cell is (something like 1 for empty space, 2 for a closed door, 5 for a wall). Cells with a value of zero don't have enough sound to cause a disturbance. Once a ring of all zeros is generated, do a second pass.

The second pass is to allow for cases where there is an open path that loops out and back while the direct paths have obstructions and therefore lower noise levels.


After the second pass, check for disturbance of the monsters.

For completeness, more passes to deal with highly convoluted paths could be done but from a practical standpoint only the least stealthy characters will be making enough noise for it to matter.

The resulting array can also be used for monster pathfinding (move towards the higher sound value to get to @).

Recalculate after each player turn. Use the most recent value in the array whenever a monster needs the info.
Zyphyr is offline   Reply With Quote
Old March 30, 2011, 01:32   #25
camlost
Sangband 1.x Maintainer
 
camlost's Avatar
 
Join Date: Apr 2007
Posts: 522
camlost is on a distinguished road
Code:
#####
#   #
# # #
# # #
# # #
#p# #
  #@#
Code:
#########
#   #   #
# # # # #
# # # # #
# # # # #
#p# # # #
  # # # @

I'm pretty sure the algorithm you suggest there fails miserably in these example. If you do (n-1) iterations of that, you might get a decent approximation (where n is the distance out you go). I'm also not sure how a path *along* a ring is calculated/weighted.

If we want sound to pass through stone, I'm not sure we can use it for pathfinding. I think something more like a breadth-first search along passageways/doors would be more suitable, at least for pathfinding.
__________________
a chunk of Bronze {These look tastier than they are. !E}
3 blank Parchments (Vellum) {No french novels please.}
camlost is offline   Reply With Quote
Old March 30, 2011, 01:41   #26
kingvictory2003
Scout
 
Join Date: Oct 2009
Posts: 37
kingvictory2003 is on a distinguished road
Talking

Quote:
Originally Posted by Derakon View Post
Thus a naked hobbit rogue has about an 8% chance of disturbing a monster each turn.
Quote:
Originally Posted by fizzix View Post
Ah the importance of context. Without context...this quote is pretty amazing.

AHAHAHAHAHAHAHAHAHAHAAAAAHAHAHAHAHA!!!

Thanks, I needed that
kingvictory2003 is offline   Reply With Quote
Old March 30, 2011, 02:38   #27
ulrichvonbek
Apprentice
 
Join Date: Mar 2011
Posts: 82
ulrichvonbek is on a distinguished road
I like this discussion, it leads to lots of interesting ideas.

I'm sure the code would get very complex in a hurry, and would require rebalancing, but I could see where mining, bashing, spiking a door, and certain spells, like ice storm, and lightning bolt are high noise activities. Fighting and opening doors are medium noise activities, and simply moving around the dungeon are low noise activities.

You could even change searching mode to stealth mode and make everything you do less noisy than usual. You could also boost the chances of getting a good/great hit in while fighting in this mode to compensate for the fact that you're going to get pounded on twice as often fighting that way.

I'm not sure that a focus on sound, and deciding between a high noise/low noise aproach would actually make for a fun experience, but it's fun to think about.
ulrichvonbek is offline   Reply With Quote
Old March 30, 2011, 06:23   #28
Zyphyr
Adept
 
Join Date: Jan 2008
Posts: 135
Zyphyr is on a distinguished road
When checking these two by hand, I made the assumption of everything not otherwise mentioned being a #, as an empty row below the mentioned sections makes it work much better. Also, I used the 1/2/5 example values.

Quote:
Originally Posted by camlost View Post
Code:
#####
#   #
# # #
# # #
# # #
#p# #
  #@#
Works almost perfectly with a 2-pass. The only potential issue would be in using it for pathfinding - both spaces above and below the 'p' have the same sound value. Disturbance values are as would be expected from manually checking everything. If the row below @ is empty instead of a wall, p will hear and move South then South-east, then straight East (assuming @ stays in place)

Quote:
Code:
#########
#   #   #
# # # # #
# # # # #
# # # # #
#p# # # #
  # # # @
The sound reaching p would be correct. Pathfinding has the same minor issue.
Also, on this one I assumed that the bottom # in the central column was supposed to be empty.... Otherwise p wouldn't be able to reach @ anyway, rendering the issue irrelevant (baring passwall).



Quote:
I'm pretty sure the algorithm you suggest there fails miserably in these example. If you do (n-1) iterations of that, you might get a decent approximation (where n is the distance out you go). I'm also not sure how a path *along* a ring is calculated/weighted.
I did fail to mention the intended order of calculation when writing it out, though I did have it in mind. I intended for it to be : For 'ring' N, start N spaces North, calculate clockwise (start at (@,@+n), move to (@+n, @+n), then to (@+n, @-n), etc). Doing an actual circle would be a waste of computational time, especially since the game considers a diagonal move the same as one along a major axis.

23-24-09-10-11
22-08-01-02-12
21-07-.@-03-13
20-06-05-04-14
19-18-17-16-15


Something along these lines :

Code:
################
#            #@#
# ########## # #
# #          # #
# # ########## #
#p#            #
################
would have issues with particularly noisy characters.

Quote:
If we want sound to pass through stone, I'm not sure we can use it for pathfinding. I think something more like a breadth-first search along passageways/doors would be more suitable, at least for pathfinding.
Setting the Stone value sufficiently high will turn off sound passing through walls, or if you use 1/2 of the worst case value it will potentially pass through a single wall, but never more than that (and even then only when relatively close to a fairly non-stealthy character).

If you want perfect results, just repeat passes until you get one where nothing changes.

As a note, I used this basic algorithm ~20 years ago to solve a maze chase problem.
Zyphyr is offline   Reply With Quote
Old March 30, 2011, 07:25   #29
Timo Pietilš
Prophet
 
Join Date: Apr 2007
Location: Climbing up from hole I just dug.
Posts: 4,096
Timo Pietilš is on a distinguished road
Quote:
Originally Posted by Magnate View Post
Thank you. So the answer to Timo's earlier question is that the limit of useful stealth is 30, including the intrinsic racial and class stealth. It is also worth noting that +1 is added to the race and class stealth numbers in birth.txt, so the maximum useful stealth for a hobbit or kobold rogue is +20. Still a way to go then Timo ...
Hmm...+4 from defender, +4 from Trickery, +4 from bodyarmor, +4 from cloak, +5 from elvenkind boots = +21. Definitely possible. What I lack currently is that defender and boots (using Dal-i-Thalion and other weapons).

In fact you can add in rings of mouse (I used two +4 ones adding +8 to initial stealth in early game, they gave me so many blows/turn more that 3d5 branded katana I had made more damage with them and gloves of slaying than they subtracted from damage). I think I have seen Elven cloaks of Aman/Stealth with +5 PVAL (+2 from base object +3 from ego-type). That adds +9 to that 21 making +30 as max you can get from items, with randarts possibly even more.

So you can go to max stealth. Even early game I had two mouse rings, elvenkind bodyarmor and stealth boots so it doesn't even take very long to get close to max with hobbit rogue.
Timo Pietilš is offline   Reply With Quote
Old March 30, 2011, 13:37   #30
Psi
Knight
 
Join Date: Apr 2007
Location: Surrey, UK
Age: 44
Posts: 870
Psi is on a distinguished road
Quote:
Originally Posted by Derakon View Post
Thus a naked hobbit rogue has about an 8% chance of disturbing a monster each turn.
I keep sniggering at this. It is pretty embarrassing in an open plan office. Not quite sure how to explain the cause of my childish giggles to my colleagues.

So just how disturbing is a naked hobbit?
Psi 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
Stealth or speed? Sirridan Vanilla 6 March 11, 2010 06:33
Quick Stealth Question Zikke Vanilla 9 November 4, 2009 12:43
Improving stealth jv123 Vanilla 7 June 22, 2009 23:07
stealth and sleeping monsters bebo Vanilla 11 February 26, 2009 20:52
Excellent Stealth bpleshek Vanilla 5 September 5, 2008 03:09


All times are GMT +1. The time now is 04:11.


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