Square Line-of-Sight

A partial implementation of square LOS is now available in branch “squarelos” and playable on crawl.develz.org.

There is some desire to move crawl towards square LOS, e.g. 2250. This is to collect potential issues involved with that change. Original content by rob.

At first glance, it would be desirable to generalize the code far enough to be able to switch distance models more easily. However, that is even more difficult and probably not worth the effort as the aim is certainly to pick one model and stick with it.

I kind of fail to see what could be playtested. Both models have a different set of problems, but none of those can be really judged when playing – save for aesthetic issues, which take a single look. — kilobyte 2010-09-13 13:35
Certainly playing with it for a bit helps judge the aesthetic issues better. — rob 2010-09-13 14:50
This really isn't true at all. There are a lot of behaviors that players pick up unconsciously because they just “work better” - I started up a conjurer on the branch, and it felt quite odd - I had no idea how much I relied on things like approaching monsters at a diagonal, or using certain movement patterns when chasing fleeing monsters to get in a last shot or two. There's a lot of “come on, nobody really takes advantage of this stuff” going around, and I think playtesting could really show how not true that is. — doy 2010-09-14 18:42


The following options have been proposed:

  • square LOS (Chebyshev's metric)
  • circular LOS
    • no spell ranges (0.4-)
    • square ranges (0.5)
    • circular ranges (status quo)
    • 1.4 movement
    • 1.2 movement
  • hex grid
  • galehar's metric: max(|x|,|y|) + min(|x|,|y|)*a, with proposed values for a 0.2 and 0.4

Balance concerns

LOS range

  • rob argues that square LOS range should be lower to keep ranged-vs-melee balance intact (player controls 213 squares with radius 8 euclidean, 289 with radius 8 square, 225 with radius 7 square on an open map). this is what was implemented on cdo
  • og17 and tgw are opposed (only the maximal LOS distance matters with euclidean LOS)
  • I also agree on the need to reduce LOS range. A big change in the number of visible squares changes balance in all kind of unpredictable and probably undesirable ways. — lemuel 2010-09-18 00:15

Stealth and stabbing

Currently, stabbers spend between 5 and 8 steps in LOS of a victim on open maps. It may be that even the move to square 7 warrants a stealth boost, considering stabbing was weak on open levels already. Should keep an eye on this.

This is definitely something that'd be affected, but is it actually a problem for stealth to be weak in open areas? Spells make LOS largely irrelevant here anyway. — og17 2010-09-07 20:30
Can't we just base stealth on time spend in the LOS of the enemy instead of moves in his LOS? If someone is moving diagonally he actually spends 1.4 more time in stealth comparing to normal move (if 1.4 diagonal move system is to be used). What's the big deal with this? dpc 2011-01-18 20:56


Just a rough overview of what needs to be changed. Not all of this needs to be done for testing, but it's hard to tell which could be left out.

  • Basic LOS model:
    • LOS_RADIUS and friends in defines.h
    • anything that relies on LOS_RADIUS_SQ
    • circle_def::circle_def() needs to use C_SQUARE instead of C_ROUND.
    • los.h:BDS_CONSTANT needs to get C_SQUARE instead of C_ROUND.
    • los.cc:bds_precalc needs to get C_SQUARE instead of C_ROUND.
  • Beams:
    • Mostly revert the euclidean spell range commits, though the code is a bit more general now so the redefining beam.cc:_length might suffice.
  • Targeting:
    • Again mostly revert the euclidean spell range stuff.
    • Touch the places that call distance().
    • Range darkening in view.cc, spell_no_hostile_in_range (move back to non-squared distances)

implemented this far in branch squarelos

  • Other code relying on euclidean distance:
    • Check and convert everything that calls distance()
    • Convert any circles with C_ROUND or C_POINTY or C_CIRCLE to C_SQUARE.
    • Check the radius_iterators.
    • This will involve changing the formula for silence radius decay (probably put in a sqrt somewhere) and how halo radius varies with piety.
  • Spell ranges:
    • As outlined above, LOS radius will need to be lowered to 7. Spell ranges need to follow, probably with range >4 dropping by one and <4 staying and case-by-case choices for spells with ranges around 3-6.

We'd also need to review vaults at some point since quite a few appear to be carefully engineered considering LOS radius and shape.


How about we merge square_LOS in trunk but put all the code in #ifdef CHEBYSHEV? If we do the abstraction correctly, it shouldn't be hard to maintain. That way we can keep it up to date more easily and even run an experimental branch on CDO. We could also add euclidean movement this way, using #ifdef EUCLIDEAN. — galehar 2011-01-27 16:28

Great idea, I absolutely approve. The theme will occur again in the future, and keeping rob's work live will be very useful. — dpeg 2011-01-27 22:48

Hex grid

All of the problems that apply to both circular and square los disappear when using a hex grid.

It would bring some implementation problems, though:

  • in ASCII, trying to display it on a terminal looks ugly
  • in Unicode, several clients (xterm, putty) can't display the needed characters without manually selecting a font
    • if you use the CJK double-width Latin characters, the aspect ratio matches a hex grid almost perfectly, better than regular characters match either circular or square LOS – which ends up being a rectangle or an ellipse
  • lots of vaults would require a thorough overhaul

I personally wouldn't vote for changing to a hex grid, but hey, it's worlds better than the square los some of you support. — kilobyte 2010-09-29 22:45

Were this a new game, I'd prefer a hex grid to almost anything else. But I think a change that drastic would wreck either Crawl or its fanbase. — minmay 2010-10-03 20:52


Please provide feedback on branch squarelos here.

  • My current impressions on the aesthetics: Doesn't bother me in non-open layouts. A little more on open levels, in particular when going down stairs into the open and the straight edges that exploring leaves (autoexplore may have a euclidean explore special case that should be removed). It feels a little buggy for me when I move into a room and it ends in a black wall – maybe this feeling will go away. — rob 2010-09-16 12:20
  • This is my impression as well. It's worse in Tiles than in console, as you would expect. Still, having consistent spell ranges feels wonderful. — minmay 2010-09-16 16:10
  • I agree that the aesthetics aren't very bad and they're certainly worth the gameplay effect. As a DEWz if I encountered a creature diagonal from me on an open layout I would retreat until the monster had positioned itself in a cardinal direction at the edge of LOS before nuking (since monsters prefer to be cardinal to the player) so I could get more nukes in before I had to blink. Now I can skip that step and gleefully nuke 'em as soon as I see 'em! — wesleyshaver 2010-09-16 19:44
  • Try running through smite, hellfire, or torment heavy levels, ouch! Vehu worshipers love square los. Melee(no spells) and stealth jobs were harder. I wonder about pre-existing vaults and branch ends needing redesigned, as some make clever use of (old)los. Also square los is imo, ugly. — porkchop 2010-09-17 17:13
  • Nightstalker should probably be tweaked in squarelos - I think if you combined it with a lantern of shadows it's possible to get LOS radius 1? Personally I think nightstalker should be -1, -2, -3 regardless of LOS shape (instead of 0, -2, -4) but in squarelos at least it should definitely be changed somehow. Aesthetically I don't have a problem with square generally, but I can probably be convinced either way in terms of the gameplay benefits. — marvinpa 2010-09-19 16:57
  • Regarding aesthetics, maybe I'm weird, but I find square los beautiful even in open levels. The most uncomfortable part, for me, is exploring circular vaults and the such with square los, but even then it's not that bad at all. — mrmistermonkey 2010-09-22 03:05
  • Square LOS/range pros: consistent, simple, not abusable. Cons: ugly (to most, could turn off new players), targeting imperfections (I noticed these about three times in a 15-rune conjurer game), requires massive balance changes. — minmay 2010-09-24 17:41
  • It's different, to be sure, but there's no gameplay issue with square LOS that couldn't be solved with a few more rounds of tweaking. Spell ranges in square LOS feel weird, but there's no reason I wouldn't adjust to it in time. There's enough distinct pros and cons to both systems that, as dpeg puts it, choosing one is simply a matter of taste. Square rooms do look better in square LOS, and exploring diagonal corridors takes much less time. On the other hand, seeing open spaces in square LOS is jarring, and “round” spaces in square LOS are hideous. I've personally never had any gameplay gripes with circular LOS. If it comes down to a matter of taste, circular LOS just tastes better. — wensleydale 2010-09-30 20:46
    • Don't trivialize this issue as “taste.” It has massive objective gameplay ramifications. — og17 2010-10-01 02:36
      • You're misinterpreting my comments. Gameplay-wise, both systems are different, to be sure. But in my opinion, neither system provides objectively better gameplay than the other. Thus, it is in fact a matter of “taste” (your opinion may differ). Square vs. circular LOS has certainly stirred up impassioned debate from both camps, but let's not make this issue more important than it really is. — wensleydale 2010-10-04 10:41
  • Range:7 square LOS requires less viewport space than range:8 round LOS. On a 1024×600 netbook screen, in the tiles version, this makes the difference between usual bottom message area vs top transparent overlaid message area (with default display settings) — ortoslon 2010-10-06 17:48


This is meant to collect things that are missing in a complete move to square LOS.

  • Shatter still uses the old LOS shape.
  • Silence, halos.
  • Exclusions.
  • Autoexplore has special code to favour cardinal movement?
  • Fire Storm and Ice Storm.
  • Noise
  • Explosions, e.g. scroll of immolation, conjuration miscast, giant spore

Comparison of Euclidean vs Chebyshev's metric

kilobyte on euclidean vs chebyshev metrics:


An oft-quoten issue are aliasing problems.

  • ○ has those only in a very few cases, but they seem to be quite random.
  • ◻ has nasty aliasing everywhere, but it's applied evenly.

It is impossible to avoid aliasing whatsoever. For that, you would need a strongly regular grid. This means, a 4-way square (no diagonals!), triangle or hex. HexCrawl was tried, and looked quite interesting.

Could you briefly explain what is meant by aliasing here, and how it affects the game? Is this that there's not a unique shortest path between given points? — rob 2010-09-13 14:46

Uniformness of directions


  • ○ is roughly fair.
  • ◻ favours diagonal exploration by a factor of 2.
I hope this doesn't come across as rude, but this seems like a purely theoretical issue. I have been playing Crawl for years – since well before Stone Soup began – and I don't believe I've ever found myself wondering how to explore a level using the minimum number of steps. In most cases, you use autoexplore and never notice what exploration algorithm is being used; when you explore manually, it's generally because you are worried about some danger, so you are going to prioritizing other factors, like staying within reach of corners to duck behind. Even when you are searching for a timed portal, the issue is almost never simply “how do I uncover the most squares on my next step,” but takes into account the layout of the level, pursuing monsters, etc. Does the favoring of diagonal exploration ever actually matter to gameplay? — lemuel 2010-09-14 17:05
This is not merely autoexploring, this goes for every single move that reveals previously unseen terrain. You indeed have twice as much time to find that timed portal (strictly twice on open levels). You scout twice as fast. You find Hell stairs twice as fast. You find Abyss portals/runes twice as fast. And so on, so on… — kilobyte 2010-09-14 22:07
But Kilobyte, this simply isn't true. Crawl contains rooms, corridors, and other obstacles. It contains monsters. Portal vaults give the warmer/colder clues. In general, in actual play, either (a) the player is using autoexplore, in which case the two metrics will be indistinguishable; or else (b) the player is actively exploring, in which case other considerations will dominate pure efficiency. An @ exploring an open, featureless space is simply not a good approximation for Crawl play. (Which is why it's important to test this stuff out in real game situations.) You do make a good argument for reducing max sight under square LOS, tho. — lemuel 2010-09-14 23:17
I watched a few players on CDO and it seems like most dungeon levels really are explored much faster. However, I am not sure this is an issue in most branches - it's arguably a good thing that players can get to portal vaults faster (unannounced timers are closer to their actual purpose now, i.e. players that explore normally will usually find them but players who dawdle a lot won't). Hell, on the other hand, is a serious case, and to a lesser extent Pan and Abyss. However, I think this is because of the greater surface area of a square rather than the superiority of diagonal movement. (Or are they the same thing?) — minmay 2010-09-15 19:02
For what it's worth, I ran a few exploration time tests (wizmode &O), and the numbers didn't seem to be off by more than 5-10% or so, if that (exploring most levels took ~650 turns in both square and circular los). I didn't look too far into it, but I don't think that this problem in particular is really very serious. — doy 2010-09-29 16:28
Note that LOS range 7 means only 76% of the area of range 8. This doesn't manifest itself much on closed levels (ie, most early game ones), so the range reduction mostly removed the discrepancy. Open levels like the Abyss still do suffer, though. — kilobyte 2010-09-29 22:45


  • ○ fully implemented would be fair, but would cause some AI issues. We currently use a hybrid system.
  • ◻ strictly favours diagonal movement. On a grid with no obstacles of size 1 you can reach any destination in no less steps using exclusively diagonal moves, and it grants a boost of up to *2 compared to exclusively cardinal moves.

> The bias here is sort of ridiculous, considering movement is “strictly” favoured by circular LOS as well (barring severe fundamental gameplay changes). — tgw 2010-09-14 13:12

Who says that diagonal movement cannot have advantages over cardinal movement? Mathematical purists may protest, but there's no factor here that will unbalance gameplay. I'm heavily against square LOS, but even I don't consider this a valid point of contention. — wensleydale 2010-09-29 21:01


  • ○ can be fair with an easy fix, out current hybrid systems rewards diagonals by a factor of 1.41.
  • ◻ is fair.

Non-cardinal/diagonal targeting

The ability to draw a straight line not in one of the 8 directions:

  • ○ mostly doable, 24 imperfections in a radius 8 circle, 28 in a radius 7 square
  • ◻ ridiculous, 224 imperfections in a radius 8 circle, 272 in a radius 7 square.

rob's current implementation of square_los uses ○ lines. This is for the same reason that roguelikes that allow throwing/casting in a non-cardinal/diagonal directions use square LOS; we could at most use a hybrid.

What is an imperfection? How does it affect the game? — rob 2010-09-13 14:46
It's when you have to choose between two different rays that have the same length.
When approximating lines on a grid, the “best” ray between points X and Y is one that goes through point Z that minimizes d(X,Z)+d(Z,Y). When there are multiple such Zs adjacent to your current point, you have to choose. — kilobyte 2010-09-13 15:47
The game could always just draw multiple lines, keeping the cursor itself still as the player moves through variations. The targeting system does automatically jump between enemies with + and -, after all, which is what the majority of situations demand. — og17 2010-10-01 02:40

Short spell ranges

  • our current “bloated diamond” approximation has ○ ranges, but limited to sqrt(x²+1). This leads to nasty results when, say, kiting a monster when using reaching – same as old REACH_KNIGHT.
  • ○ is strictly more powerful than ◻ up to range of 2 – it can handle for example both range sqrt(8) (old REACH_TWO) and sqrt(5) (REACH_KNIGHT).
  • ◻ can do only integer ranges. Ie, REACH_TWO but not REACH_KNIGHT.
This is particularly valid when ranges continuously grow or shrink. Examples of such effects currently used are: TSO's Halo, Zin's sanctuary, the Silence spell. — dpeg 2010-09-13 16:37

I'd just like to say: cut the jargon. Most of us don't understand it. — studiomk 2010-09-13 17:58

That is rude, in comparison to, say, asking for a specific clarification - take cue from rob. :P Don't be rude. — evktalo 2010-09-13 19:05

Single grid for movement and ranges

lemuel: The fundamental argument for using the Chebyshev metric for ranges is that it is that it is already used for movement. As long as ◻ is used for movement and melee and ○ is used for range, inconsistencies will arise that make for awkward gameplay. Most notably, two points that are the same distance apart in terms of steps, may be at different distances for range calculations. While most of the above are second-order issues that will not generally be noticed during normal play, this is a first-order issue that has a noticeable effect on most combats in open spaces. For instance, with Euclidean ranges, a player who wants to engage in ranged combat with a monster, should move toward a position orthogonal to the monster, while a player who wants to minimize ranged attacks should move toward a diagonal.

It's possible to implement hacks for particular cases, like stealth, but that simply creates a new inconsistency in that the cost of an orthogonal and diagonal step are the same for some purposes, and different for other purposes. The only complete solution is to use either Chebyshev or Euclidean distances for both movement and range calculations.

The argument for Chebyshev distances is that a Euclidean metric for movement would be a massive change to both code and gameplay, while Chebyshev distances for range are relatively straightforward to implement and intuitive for players. More generally, the argument is that the grid in roguelikes is an integral part of the game and not just a rough approximation to continuous space. But in any case, the game needs to use a consistent metric for both movement and ranges.

No one proposes Euclidean metric for movement right now, the hybrid system works just fine right now, save for two quirks (stealth and reaching/flame tongue) which are easy to fix. And if you disagree with hybrids, then please rip away throwing/casting not in one of 8 basic directions (like NetHack). That's a pure system for you. — kilobyte 2010-09-14 22:13
Again, this just isn't true. I pointed out another issue in the exact text you're responding to – that the number of steps and the range between two spaces don't coincide, so that whenever one agent is either fleeing or closing while the other is making ranged attacks, the number of attacks before melee/escape will depend on whether they are oriented diagonally or orthogonally. This isn't a minor quirk, it affects every ranged attack of less than LOS range. — lemuel 2010-09-14 23:26


Noise actually uses euclidean geometry to calculate range, so this should be changed to Chebyshev. It actually uses the distance function in coord.cc. Changing it might impact other stuff, but probably in a good way :) — galehar 2010-09-21 21:17

Galehar's metric

There's another interesting proposal: to use a weighted average of L∞ and L1 (ie, between Chebyshev's and Minkovski's metrics). The formula is: max(|x|,|y|) + min(|x|,|y|)*α. For α=0 you get Chebyshev's L∞, for α=1 you get Minkovski's L1.

It does have all of the proposed benefits of Chebyshev's except for ease of calculating ranges by counting, and for some values of α it approximates Euclidean ranges well enough that the result is neither ugly nor calculating ranges with a ruler is much off.

It does have the property that the range is exactly equal to the walking distance, which is the primary benefit proponents of squarelos preach (note that Euclidean+1.4 movement does this with a good approximation as well, it's a thing only status quo lacks).

I'm not sure I understand how the range is exactly equal to the walking distance here - the point at (5, 5) is going to be a distance of 7 away, how will it take 7 turns to reach it? Does this also require adjusting diagonal movement speed? If so, how is it an improvement over Euclidean+1.4? — doy 2010-09-30 16:27
I'm not sure I understand either! My original idea was that maybe it's possible to find a middle ground between pure euclidean (1.4 diagonal, round LOS) and pure Chebyshev (1 diagonal, square LOS). A system not perfect, but coherent and with imperfections small enough that they don't matter tactically. So, I'm wondering what LOS shape would be appropriate for an 1.2 diagonal. I thought maybe an octagon, but probably not. kilobyte came up with the formula above and made some graphs for 0.2 and for 0.4. The 0.2 graph doesn't look much better than square, so I doubt it's a good idea. I'm not sure if α=0.2 means diagonal speed of 1.2. If that's the case, I don't see the difference between this system with α=0.4 and pure euclidean. — galehar 2010-09-30 21:28


Summarising a lengthy ##crawl-dev discussion on the matter. There are very many aspects, different systems (it is not just round vs square) and subjective notions. — dpeg 2010-09-29 20:01

Let me start with the most important observation: Both round and square LOS can work. Both have certain unique (dis)advantages. Choosing one is a matter of taste.

I will compare round and square LOS relative to the newcomer (so all cons below are pros for round LOS):

Square LOS:

  • Pro: Reliable shooting ranges. Whether you can shoot at some monster does not depend on certain movement tricks anymore (the same applies for getting out of a monster's range).
    • ◻+ ○1.0- ○1.4+ ⬡+ gal+
  • Pro: Clearer ranges. With round LOS, it is harder to find out whether you can hit a monster with a spell of certain range. (Note that whether you can do so is perfectly open information in round LOS, it is just slightly obfuscated.)
    • ◻+ ○1.0- ○1.4- ⬡+ gal-
  • Con: Ugliness. This is subjective, of course (but I share the feeling, especially with halos etc.) and related to the next point.
    • ◻- ○1.0+ ○1.4+ ⬡- (without Unicode CJK or tiles) gal+
  • Con: Non-realistic. Nobody expects a square LOS. This might put off new players.
    • ◻- ○1.0+ ○1.4+ ⬡= gal=
    • This is hard to understand, as it'd seem more realistic for distances to be of equal length no matter what angle they're at. As in reality. — og17 2010-09-29 21:11
      • we received bug reports since people, as you say, expect distances to be of equal lengths no matter what angle they're at. Ie, [5,5] is farther than [5,0]
        • [5,5] and [5,0] are both a distance of five, what? — og17 2010-09-29 23:23
    • I expect a square LOS, since it's consistent with other measurements, just like I expect a round LOS for anything set in Euclidean space; in this way, I find it more realistic for a roguelike to use square LOS. Not sure why anyone would expect inconsistency, maybe I'm weird. — mrmistermonkey 2010-09-29 21:21
      • Rather, instead of people expecting distances to be of equal length regardless of angle, people expect systems to approximate euclidean space as best they can (even if the system can't do a very good job of it). In square LOS, ideally people would see a square and think, “that's a circle,” much as they should see a circle and think, “that's a four-petaled flower,” or see a four-pointed star and think “that's a square.” It may be more mathematically consistent, but it's less consistent with everyday reality. — wensleydale 2010-09-30 20:55
        • Everyday reality isn't on a grid. Real life is to circles as square grid is to squares. — mrmistermonkey 2010-09-30 21:22
          • Right, and as I mentioned, the prevailing paradigm in video games is to attempt to approximate reality. As I also mentioned, this holds true even when the system itself, such as a grid of squares, is not ideal for this purpose. :P And no, I'm not saying, “every other game does it so Crawl must do it too!!” Instead, I'm saying that new players, be they video game veterans or my ultra-hip grandmother, will come into this game expecting something that is not true. If we want the consistency of, to paraphrase, squares to a square grid, then we'll have to accept the existence of yet another barrier to entry for new players. It's not an insurmountable barrier by any means! But it is my opinion that it is undesirable nonetheless. — wensleydale 2010-10-01 01:25
            • It's immediately obvious that Crawl is played on a grid - no one is going to look at the game and be puzzled because they can't step halfway between two glyphs, for example. Calling this an obstacle is fantasy, as is thinking that people would have the same expectations for an abstract roguelike that they would for games that actually do try to create a realistic simulation - people are going to associate Crawl with something like a checkerboard, not a Halo map. They're not this stupid. — og17 2010-10-01 02:24
    • My thoughts exactly. — minmay 2010-09-30 01:15
    • Agreed. — doy 2010-09-30 06:08
  • Con: Targeting imperfections. This relates to the question how many equally valid choices there are for drawing a straight line between two spots. (If there is more than one, then targeting has to select one of them, and allow the player to cycle among the choices.) Square LOS has more such imperfections than round LOS.
    • ◻many ○few ⬡few
    • As it stands right now, we just pick one arbitrarily and don't really bother with it - this works fine for the imperfections in circular ranges, don't see why it wouldn't continue to work fine for the imperfections in square ranges. — doy 2010-09-30 06:08
  • Con: kilobyte mentioned that square LOS strongly favours diagonal movement. I hope I get this right when I compare this with a Chess king trying to get from A1 to H8 as fast as possible (only a single choice: always diagonally) or moving from A1 to A8 (very many options). This means that exploration is worse off in square LOS, if I understand correctly.
    • ◻- ○1.0- ○1.4+ ⬡+ gal+
  • Con: It might be necessary to adapt some (not many, I believe) vaults if we change to square LOS.
    • ◻some ○none ⬡many
  • Other: kilobyte has investigated a number of roguelikes and none of them uses square LOS. (Not all of them use round LOS either, but many do.) However, I believe this should not hold up from going to square LOS if we think the gains are worth it.
    • This is disingenuous, as I don't believe any games use .7's euclidean ranges either. They instead use square ranges, ranges that extend to the edge of LOS, fixed-directional targeting, etc. And since when does crawl care about what other games do, anyway? — og17 2010-09-29 21:11
      • “Any”? Let's see: Circular: DoomRL. Diablo. ToME. Fixed directions: NetHack. Hybrid: ADOM. Should I check more?
    • All use either: circular for LOS or screen LOS circular effects. — kilobyte 2010-09-29 21:29
      • None of these examples mean anything: DoomRL projectiles ignore LOS. Diablo is an isometric fullscreen game that's barely gridbased and certainly not square. ADOM uses .6-type squares for targeted ranged weapons and, I believe, LOS for spells. None of these games attempt to shove euclidean targeting onto a chebyshev world. “Circular effects” are a somewhat different issue, but they're often circular because the view itself is circular; if these games held mechanics to be important enough to use a square view themselves, they'd also be using square effects. Circular explosions/etc are there to look nice, not to play reasonably. — og17 2010-09-29 23:23
        • Agreed - arguing about what other games may or may not be doing is completely meaningless without understanding the reasons why those other games made their decisions. None of those games is Crawl, and so if we're going to make a decision here, “what other games are doing” in and of itself should have no part in the argument. If those other games made the decision for an actual reason, bring up *that actual reason* and explain how it pertains to Crawl. I happen to think that Crawl has a reason to be different, being far more oriented toward tactical decision making than the majority of roguelikes. — doy 2010-09-30 06:08

Some further remarks:

  • Introducing spell ranges in 0.4 did not create the problem, but aggravated it: since then, players have to be much more aware of ranges. (Before, “can hit” just meant “is in LOS”.)
  • The fundamental problem comes from combining different metrics: for walking, we use Chebyshev (each of the eight adjacent squares is the same), whereas for ranges we currently use Euclidean (round). Square LOS is one way to achieve consistency here, but another would be to make diagonal movement more expensive (by a factor of 1.4). I am not sure whether it is worth pursuing this, however. See next point.
    • Yes, I think that either fully square ranges/los or fully euclidean ranges/los (including diagonal movement speed adjustments) would be a significant improvement over the current implementation. I'm more concerned with consistency in gameplay than anything else. — doy 2010-09-30 06:08
  • Regarding realism, I would like to say that roguelikes are pretty strong on abstraction: abstract space (uniform grid), abstract time. Both of these never have been problems for players. This may or may not be the same for square LOS, which is just another such abstraction. The reason that no other roguelike uses square LOS might be that the very idea is too radical, or also that they don't strive for as much tactical depth as we do. (Board games and tactical games might be closer to square LOS.)
  • Everyone agreed that shooting beyond LOS is bad (and should be reserved for special spells/effects). With 0.5 and 0.7, we have used different models (would be good to list the changes below, can someone do that?).
    • In 0.5, we used circular LOS and square ranges - this meant that any spell with a range greater than 5 could shoot outside of LOS if aiming diagonally. 0.7 changed ranges to be circular as well to avoid this loophole. — doy 2010-09-30 06:08
Re achieving consistency: What do you mean? I'm guessing Square LOS means using Chebyshev for LOS, but will you also be changing ranges to use Chebyshev? If so, then you are standardizing distance to be Chebyshev, no? — zannick 2010-09-29 22:37
Yes, by “square los” we include ranges as well - effectively just “standardizing on Chebyshev distance”. This is why I'm in favor of it. — doy 2010-09-30 06:08
We should standardize on something good… you would want consistency at the cost of quality. And most other proposals do have that consistency as well. Status quo is not one, but all the others do: hex, full Euclidean, Galehar's. — kilobyte 2010-09-30 12:34
Can anybody just collect the problem points with making diagonal move cost 1.4 of normal one? I'm lost with all this and can't find anybody pointing out the actual problems with this (IMHO) trivial change fixing all the incosistency in most realistic and natural way? — dpc 2011-18-01 21:00
I would hardly describe such a change as trivial. Consider the scenario of being chased by an ogre one square away, down a corridor with a corner in it. As-is, it's business as usual; 1.4x cost for diagonal movement immediately turns that into 'there is a reasonably good chance the ogre is going to turn me into paste'. Besides things like that, it's just exceptionally unintuitive. — dtsund 2011-01-19 02:09
One would assume the Ogre would be paying the same price to follow the same path. — shade 2011-01-19 07:50
1.4 Is very unintuitive for new players, It's hard to make it transparent. The ogre thing, is all about attack speed, if attack speed stays the same while diagonally movement is changed to 1.4, the ogre will hit you. Making diagonal melee slower (to match movement speed) will make matters worse, especially when you are surrounded. I think a square LOS is the best option. — co 2011-01-19 08:38
No, truly new players do know (or have very good reason to expect) that moving diagonally might not be as fast as moving orthogonally, because that's the way it works in the real world: If you zig-zag NE,NW,NE,NW across an open room when fleeing an ogre, it should catch up to you, not just zig-zag along as it does today. Existing players of roguelikes would be surprised at first, but would adapt quickly. Dancing a pillar (larger than 1×1) would not be affected, except that you'd need another square of safety margin occasionally, since the ogre has no choice but following the same path as you. Square LOS is ugly and would be a huge step backwards for Crawl. — vintermann 2011-03-21 14:12
These hypothetical new players would be at least passingly familiar with board games such as chess, and probably much more familiar than they would with trigonometry. Nearly every board game on the market that has a square grid with 8-way connectivity counts diagonals as 1, and I am fairly confident that there isn't a single one that uses 1.4. Game design doesn't happen in a vacuum; the prior experience and expectations of the player is extremely relevant. — koboldlord 2011-03-21 17:09
Are new players hypothetical, now? Board games that aim for realism in movement use hex grids. Crawl does not have that option. Board games have to keep a rather simple, abstract model so they don't become too fiddly - computer games can be a lot more complex by taking care the bookkeeping for you. I know of at least two tactical, turn-based computer game series that for some reason chose the square grid rather than hexes, (X-COM and Jagged Alliance), and both have increased cost for diagonal movement. (D&D 3. ed also had a system to correct diagonal movement costs) Players aren't stupid, they will adapt quickly to a system that makes sense. You don't need to know trigonometry to appreciate that zig-zaging is a bad idea when running away from something. — vintermann 2011-03-22 09:33
I came here to point out (after reading this wiki page offline) that D&D third edition uses 1.5x movement for diagonals (mostly for the purpose of being easier to calculate with mentally, as opposed to the “true” value of 1.414…), but vintermann beat me to it. (It uses circles for circular spells and lamp-based LOS, so movement “circles”, being octagons, are not quite the same shape as casting “circles” which are actually circles.) However, the confusion's reduced a lot by allowing multiple moves in a turn, and you have to move a whole number of squares by the end of your turn. I'm not convinced that would really work too well for Crawl, as a result. — ais523 2011-03-22 16:18

There is another option that I am including merely for the purpose of brainstorming: simulate a hex grid with square tiles by offsetting them. If this idea is not good maybe thinking about its problems will lead to a better idea. See the board game/computer game Guardians of Graxia for an example of this. — wesleyshaver 2011-06-16 13:53

Logged in as: Anonymous (VIEWER)
dcss/brainstorm/gameplay/square_los.txt · Last modified: 2011-12-22 00:30 by XuaXua
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki