Area of Effect

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kandrc
    Swordsman
    • Dec 2007
    • 299

    Area of Effect

    There's been a good bit of talk here and in the newsgroup about implementing circular area of effect in V. I strongly agree with the idea that screen-size area of effect for detections is broken, but I argue that circular detection AOEs are at least as bad. It seems like I am the only person who has thought about this--or at least, nobody has posted thoughts online--and noted the inherent inconsistencies, so I'm speaking up about it.

    The appeal of a circular area of effect is aesthetic. In the real world (under some idealizing assumptions), my shout or an explosion, attenuate equally in all directions, so we naively believe that such an effect makes sense in Angband. The fallacy here is the result of a discretization of a continuous world within the framework of the game. In the real world, a fireball expands in an infinite number of directions. In Angband, it expands in 8 directions.

    The reason this is a problem is because the 4 off-axis directions (with a "distance" of sqrt(2) times the on-axis distance--assume d 1--separating them) do not require more energy for the most mundane actions in the game (walking, running, disarming, melee), but a circular area of effect enforces that they do implicitly require more energy for magical effects. Inconsistency is always bad. The fact that we would not be able to neatly and efficiently align our detection areas is an annoying gameplay decision. Nonetheless, in such a situation I would be happy to accept annoying gameplay in exchange for realism if it didn't involve inconsistency, but the inconsistency here is the kicker.

    So what is the solution? Well, we could make all diagonal actions require 41% more energy, then circles make sense everywhere, but his is a gameplay problem that is far beyond annoying. If you're being meleed from more than one direction, and the baddest bad guy is on an off-axis, it's entirely unintuitive whom you should take out first, and the energy system that Angband uses for time is not equipped to handle this (though a discrete event simulator based engine could deal with it satisfactorily). Unfortunately, even if the engine could handle the solution, it still creates situations that players cannot effectively reason about, so this is a bad idea.

    The other solution is to accept that Angband is a discretized simulation with only 8 directions, forgo our false aesthetic, and make all areas of effect square. This leaves no internal inconsistencies, it's more efficient and easier to program to boot, and it makes detection spells easier to align.

    As an illustration, take a wizard (or if you're not worried about fubaring your turncount, your current character) to 50' and stone to mud as far as you can in a cardinal- then in a non-cardinal direction (this will work better if there is rock the whole way) and count how far your tunnels have gone, then try to convince yourself that this makes sense. Arrows and thrown objects behave in the same nonsensical fashion as s2m. If I'm Smaug, hurting and trying to get away from flying bolts, I'm going diagonally!

    I'd like to see even things like light radii and ball spell effects square, but I think this distinction has very little effect on gameplay in truth, it's a nice aesthetic, and I'm willing to live with this inconsistency; however, missiles, beams, and "unexploded ball spells" fired in all directions from a central point should certainly map out a square, as should detection spells.
  • Bandobras
    Knight
    • Apr 2007
    • 726

    #2
    That makes some sense. What should be the area of the detection rectangle? One standard town size? Twice that, one below another? Four? Or make it a square? I try to use fonts as close to squares as I can get for Angband, but squares would still look uneven.

    Comment

    • zaimoni
      Knight
      • Apr 2007
      • 590

      #3
      Originally posted by kandrc
      Well, we could make all diagonal actions require 41% more energy, then circles make sense everywhere,
      If realism were an objective, this misses the real issue: why should move time/energy cost equal attack time/energy cost at all? (They already don't for extra-shot bows.)

      I'm not sure what this would do to game balance, but the following would "make sense" for forking from V:
      * move energy cost: 100 for cardinal directions, 150 for diagonals. [This way, energy cost is the same for moving distance three cardinally and diagonally.]
      * leave all action energy costs unchanged (including attacking)

      (Note: energy is represented as 16-bit signed, so this change does not require a data representation change.)
      Zaiband: end the "I shouldn't have survived that" experience. V3.0.6 fork on Hg.
      Zaiband 3.0.10 ETA Mar. 7 2011 (Yes, schedule slipped. Latest testing indicates not enough assert() calls to allow release.)
      Z.C++: pre-alpha C/C++ compiler system (usable preprocessor). Also on Hg. Z.C++ 0.0.10 ETA December 31 2011

      Comment

      • Patashu
        Knight
        • Jan 2008
        • 528

        #4
        While one -could- make diagonal movements cost 41.4% more (and, indeed, games like HoMM3 do) I'd say they shouldn't on account of...well, actually, I'm not sure why I think this. You could try modding it in as an option changeable under = and seeing how the game plays.
        My Chiptune music, made in Famitracker: http://soundcloud.com/patashu

        Comment

        • aeneas
          Adept
          • Jun 2007
          • 158

          #5
          Originally posted by zaimoni
          If realism were an objective, this misses the real issue: why should move time/energy cost equal attack time/energy cost at all? (They already don't for extra-shot bows.)
          I've always assumed that when people talked about circular detection they meant circular in Angband space- i.e., rectangular in our space. To do anything else would be to elevate "real-world" realism above Angband-world realism, and pragmatism. Trust me, I've thought about it, but I didn't imagine any maintainer would implement real-world circular detection. I don't care about realism, but I do care that detection tiles. If it doesn't, it is broken, and you would have to have a remarkable lack of understanding of the game to think otherwise- that, or want a rather capricious game.

          This is closely related to Nick's post, quoting me . I've been meaning to get back to it, but it calls for a careful response, and I was too tired to give it one last night. Unfortunately (at least for this discussion), I have to meet someone who gets off work tonight at the stroke of the New Year, so I can't explain fully (love, or at least animal attraction, conquers Angband), but this is one area where turncount matters, and is one (of many) things that I meant.

          If turn-count is irrelevant you can just rest until you have the mana to detect the next panel (with the proviso that things will generate in that time). If you lack detection as a spell you can just recall a lot to get more detection scrolls or staves. I happen to play with settings that require four detects to detect the whole level- the first detect gets more than 25% though. This has an effect- for instance my current character found his first !Con at 4950 (EDIT: 2450)... had he detected the whole level at every level he almost certainly would have found some earlier. This was only the case because he was dropping quickly, and didn't want to waste turns recalling to get more ?detect object. I don't disagree that detection shouldn't vary with resolution/font size/ etc, but I think it's important to realize that this is not a balance issue _unless_ you care about turns, or some proxy.
          Last edited by aeneas; January 1, 2008, 05:53.

          Comment

          • Atriel
            Apprentice
            • Aug 2007
            • 81

            #6
            Detection range was originally one screen of old unix
            computers of moria era. This means, an area of around 42x32
            or so. So yes, detection as is today is much more powerful
            and abusable in the default configuration in most machines.
            If you play a little bit of UMoria and then after, a little bit of
            Hengband or FaAngband youll notice that the retangular area
            originally meant to be in Moria can easily fit inside the
            circular area of H/FA.
            It wouldn´t be bad if energy to move diagonally costs 140 or 150
            for the sake of consistency, but retangular detection range is
            something so abstracted and full of munchknism as it is now
            that it gives me the creeps just to think about playing Vanilla.
            Dammit, the thought of having retangular detection
            just to make a pattern of X (number of detections) to perfectly
            map the level is a joke right?
            Maybe if circ detection is implemented, purists can imagine retangles using four tangents of the circles

            Comment

            • zaimoni
              Knight
              • Apr 2007
              • 590

              #7
              Originally posted by aeneas
              I've always assumed that when people talked about circular detection they meant circular in Angband space- i.e., rectangular in our space.
              V distance actually ends up with digitized octagons rather than digitized circles. As a side effect, the distance traversed in two diagonal squares is exactly 3 no matter how many multiples of 2 are involved.

              The weirdness is that diagonal movement is hyperefficient; bumping the energy cost to 150 for diagonal moves mostly compensates for that. (I did propose the 141 to Ben Harrison at one point, but he corrected me much the way I'm relaying now.) My concern about balance is that I'm not fully comfortable with giving free attacks on anyone just for moving diagonally.

              Originally posted by aeneas
              I don't disagree that detection shouldn't vary with resolution/font size/ etc, but I think it's important to realize that this is not a balance issue _unless_ you care about turns, or some proxy.
              It is a balance issue because inexpensive whole-level detection makes the game easier, absolutely. Without whole-level detection, clearing levels is necessary; with whole-level detection, clearing levels is an ironman play style.
              Zaiband: end the "I shouldn't have survived that" experience. V3.0.6 fork on Hg.
              Zaiband 3.0.10 ETA Mar. 7 2011 (Yes, schedule slipped. Latest testing indicates not enough assert() calls to allow release.)
              Z.C++: pre-alpha C/C++ compiler system (usable preprocessor). Also on Hg. Z.C++ 0.0.10 ETA December 31 2011

              Comment

              • Nick
                Vanilla maintainer
                • Apr 2007
                • 9637

                #8
                Originally posted by aeneas
                This is closely related to Nick's post, quoting me . I've been meaning to get back to it, but it calls for a careful response,
                I'm not convinced of that. I think I was talking rubbish

                As for detection area shape, I'm now so used to (euclidean) circular detection that it seems natural to me. I suspect there's not a canonical answer to this, but maybe I'm wrong. It has happened.
                One for the Dark Lord on his dark throne
                In the Land of Mordor where the Shadows lie.

                Comment

                • Narvius
                  Knight
                  • Dec 2007
                  • 589

                  #9
                  Originally posted by zaimoni
                  My concern about balance is that I'm not fully comfortable with giving free attacks on anyone just for moving diagonally.
                  Why that? It is natural that moving farther takes more times, thus giving your foes more opportunities to attack you. It would also make place for a new special item trait - something like short-distance-warping, allowing you to move diagonally at normal speed.
                  If you can convincingly pretend you're crazy, you probably are.

                  Comment

                  • zaimoni
                    Knight
                    • Apr 2007
                    • 590

                    #10
                    Speed is one of the more critical parts of *band game balance. On top of that, this change penalizes corner-cutting even more than V already does. Consider
                    Code:
                    @.
                    #.
                    #k
                    With the V vision algorithm, the kobold isn't visible without telepathy or a detection spell. So you already have the in-game penalty of a surprise attack (which may instadeath a first-level mage, or in Zangband and its descendants instadeath anyone in the early game should it be a death sword there).

                    If diagonal moves cost 150 rather than 100:
                    * kobold is effectively temporarily speed +5 for one player turn.
                    * unless magic mapping indicates a very long hallway, it would not make sense (without detection) for a high-damage ranged attack-competent character/monster to cut a corner because cutting the corner slows down the next attack should it be useful.
                    Zaiband: end the "I shouldn't have survived that" experience. V3.0.6 fork on Hg.
                    Zaiband 3.0.10 ETA Mar. 7 2011 (Yes, schedule slipped. Latest testing indicates not enough assert() calls to allow release.)
                    Z.C++: pre-alpha C/C++ compiler system (usable preprocessor). Also on Hg. Z.C++ 0.0.10 ETA December 31 2011

                    Comment

                    • takkaria
                      Veteran
                      • Apr 2007
                      • 1951

                      #11
                      FWIW, current V development version has a fixed-size rectangular area-of-effect. I experimented briefly with circular detection, but people complained and I hadn't even considered fixed-size AoF. Testing always appreciated -- I imagine V3.1.0 will draw some interesting feedback on this matter.
                      takkaria whispers something about options. -more-

                      Comment

                      • aeneas
                        Adept
                        • Jun 2007
                        • 158

                        #12
                        Originally posted by zaimoni
                        V distance actually ends up with digitized octagons rather than digitized circles. As a side effect, the distance traversed in two diagonal squares is exactly 3 no matter how many multiples of 2 are involved.
                        Right- and given a grossly quantized world there really isn't any analogue of a real-world circle anyway... but squares are, at least intuitively, closer to circular in Angband space than are, say, Bresenham circles (I think the difference in divergence, mathematically, depends on the extent of the area, but I am too lazy to think that through, as I don't think it is the most important factor anyway), and I guess rectangles are closer to real-world ellipses. They have a number of other virtues, including the fact that they tile, and that they are easier to think about for both the coder and the player. I disagree with the OP- I think gameplay is more important than consistency. The only reason that I think "realism", or even concreteness should be a factor is as a mnemonic, and for flavour- it is a lot easier to remember that an AMHD breathes for big damage with base elements + Poison than it is to remember that "Monster #373" does.

                        Originally posted by zaimoni
                        The weirdness is that diagonal movement is hyperefficient; bumping the energy cost to 150 for diagonal moves mostly compensates for that. (I did propose the 141 to Ben Harrison at one point, but he corrected me much the way I'm relaying now.) My concern about balance is that I'm not fully comfortable with giving free attacks on anyone just for moving diagonally.
                        This is something a lot of games have had to come to terms with- using a square grid but messing with the energy costs has not been adopted much, and I think there are good reasons for that. In cases where it is really important, hexes seem to be the normal choice- not perfect of course, but better. It might be interesting to see what a hex-connected Angband looked like (there's an idea for maintainers who really want to be distinctive, and are masochists- it has been proposed before), but I doubt that it would improve the game, and it would complicate things a great deal. BTW, I actually remember that discussion with BH, though probably from reading the archive later- I was playing Angband at that point, but not reading r.g.r.a, I think.

                        I'll also note that the unintended consequences of inconsistently adding vectors have actually led to some great games- Quake is not much like Angband, but it would have been a far poorer game, for good players, if not for that- as Q3 was, when they finally "fixed" it (CPMA, OTOH...) but I guess that further discussion of that belongs in the "other games" thread.

                        Originally posted by zaimoni
                        It is a balance issue because inexpensive whole-level detection makes the game easier, absolutely. Without whole-level detection, clearing levels is necessary; with whole-level detection, clearing levels is an ironman play style.
                        Well, this is part of my point. In V, clearing levels is a lot easier than some of the alternatives, so I have to dispute your use of the word "absolutely". I'm not sure if you are using it in the technical or the colloquial sense though...

                        The easiest way to win V is what I'd call a "punctuated equilibrium" strategy (apologies to anyone with strong anti-evolution sentiments ). This involves stopping at particular spots until the set of things you want at that depth shows up. In the extreme it means scumming for the safest vaults (the GCV, for instance, is very safe if you meet certain requirements) at around 2000', after you are already powerful, and getting to clvl 50 and something close to a minimal winning kit before passing 2500'.

                        That's an extreme play-mode, but looking at the ladder it seems to be a very common way of winning (one thing I think would be great is a feature letting you look at every past dump for a character), and it's not far out of line with the traditional wisdom about Angband (get FA before 1000', get rBase before 1750', get rPoison before 2150', cover all, or almost all, resistances before 3000'). Basically, the traditional wisdom about V is that you should play in such a way that only an egregious error can kill you... well, this is not completely without risk- I can be counted on to make a certain number of egregious errors... but it is hard to call that play-style with very limited detection absolutely easier than playing way out of depth with full level detection.

                        That is not to say that I am in favor of full-level detection. I'm not. But I have to ask why Atriel's stomach is churned- show me a 500k turn win and I might accept the state of your stomach as an indicator of game balance- until then you're just sick to your stomach.

                        Almost every complaint about V goes away if you play fast enough. Too much junk? My current character has yet (at 3500') to find a wearable pair of gloves, let alone ego boots. Every drop is exciting. There, TMJ is done away with. But, to do away with boredom I had to go to 2500' with only rBase and <300 hp. I guess that the fact that I could detect 1/4 of the level was abuse... Adunaphel coming straight for me, Dracolisk to the left and Dracolich to the right... then Atriel puked on my shoes and I was, like, this is the last time I take you anywhere... just to let you know, Morgoth's sister's are _cute_ ... so I took the stairs down .

                        Seriously- before you puke on my shoes you ought to have some justification. And you also ought to understand that not everyone waits to have 800 hp before passing 2000'. Almost every balance suggestion ignores that.

                        I'd be happy to see V made harder.. but it's kind of silly to talk about making the game easier or harder for people who can't win anyway , or who can only win by playing for more than a million turns, which is the same thing.

                        Comment

                        • gglibertine
                          Adept
                          • Dec 2007
                          • 234

                          #13
                          Originally posted by kandrc
                          The fallacy here is the result of a discretization of a continuous world within the framework of the game.
                          The Technical Writer smites you. You die.

                          I don't agree with your reasoning either, but mostly I just had to smite you because that sentence made my brain hurt.

                          Comment

                          • zaimoni
                            Knight
                            • Apr 2007
                            • 590

                            #14
                            Originally posted by aeneas
                            Originally posted by zaimoni
                            It is a balance issue because inexpensive whole-level detection makes the game easier, absolutely. Without whole-level detection, clearing levels is necessary; with whole-level detection, clearing levels is an ironman play style.
                            Well, this is part of my point. In V, clearing levels is a lot easier than some of the alternatives, so I have to dispute your use of the word "absolutely".
                            Well, there's always powerdiving once you have a properly enchanted bow. But, at least early/mid-game, skipping no-drop relatively low-experience monsters makes the game easier in practice -- and that can't be done without whole-level detection reliably.
                            Zaiband: end the "I shouldn't have survived that" experience. V3.0.6 fork on Hg.
                            Zaiband 3.0.10 ETA Mar. 7 2011 (Yes, schedule slipped. Latest testing indicates not enough assert() calls to allow release.)
                            Z.C++: pre-alpha C/C++ compiler system (usable preprocessor). Also on Hg. Z.C++ 0.0.10 ETA December 31 2011

                            Comment

                            • aeneas
                              Adept
                              • Jun 2007
                              • 158

                              #15
                              Originally posted by zaimoni
                              Well, there's always powerdiving once you have a properly enchanted bow. But, at least early/mid-game, skipping no-drop relatively low-experience monsters makes the game easier in practice -- and that can't be done without whole-level detection reliably.
                              Compared to diving there's not much danger to killing the low-xp mobs. OTOH, the game already limits detection for mage-casters, if they dive, by making detect invisible too expensive to cast more than once/level for turn-counters. Almost got capped by Adunaphel recently because of that. For priest-casters it is different- they catch Adunaphel, but miss hounds. Gravity Hounds are the only big problem there, before 2000', but.. that's a big problem. I lose more Priests to Gravity Hounds than to any other single monster. Anyway, if you don't care about turns all you have to do is sit and regenerate mana until you can detect again.

                              Angband can be made arbitrarily easy if you are patient enough. The borg wins occasionally, and Neo won something like 3 out of his first 4 games. There are only two solutions, that leave Angband Angband, if you want the game to be harder. You can make it more capricious, or you can penalize people for not moving forward at a certain rate.

                              Comment

                              Working...
                              😀
                              😂
                              🥰
                              😘
                              🤢
                              😎
                              😞
                              😡
                              👍
                              👎