goodcoolguy wrote:Shard1697 wrote:How are they mistaken?
Well, try drawing yourself some mock-up crawl maps and decide for yourself whether his claim about how this terrain would have to be placed holds up. I believe you will see it is very easy to devise patterns of terrain that break up cycles in the map in a way the player can't avoid as he describes without using a huge amount of it.
@dpeg: thx.
Indeed Shard1697 is incorrect, it woudn't require every wall square have kudzu adjacent, it would require (at minimum) that every contiguous chunk of wall that doesn't connect to an outer-border have terrain adjacent to it somewhere, and that in the event you have a non-optimal walking space (think a big "C" where you don't need to walk along the inside of the "C" part) that it not be in that area (the interior of the "C")
There are also some non-trivial patterns that form an effective "loop" , that you would need to apply terrain to, as a simple example, given two horizontal lines of walls of the same length, I can treat it as a big square:
- Code:
.......
.#####.
...T...
.......
...T...
.#####.
...@M..
In this example (@ is the player, M is a monster, and T is a terrain square), even though terrain is attached to both contiguous wall sections, I can simply ignore the terrain and walk around the two disparate wall sections as if it wasn't there. (The space between the two disparate wall sections is technically "non optimal walking space" when talking about walking around the square that encompasses the two sections) There would need to be terrain on the "outside" of the loop (This gets weird and complicated when you add more complexity to it, for example what if there are three sections like that, or one to the left or right that's perpendicular to these two, keep in mind that I can also figure 8, or adjust the diagonal slightly if need be to avoid terrain if it's in a slightly wrong place)
This makes reliably detecting all "loops" that one could exploit fairly difficult, and a heavier-handed solution that was more certain would probably result in enough terrain that it violates the "mostly be able to re-position in combat normally" condition, It'd be an interesting problem to solve, but I'm not sure the solution doesn't devolve into brute-forcing every path from every single square that the player could start at (I don't think that is reasonable, personally). You could also do something like draw a diagonal line every of terrain 3 squares, of course I would call that "impeding normal combat repositioning" but I'm sure everyone has a different threshold for that.
As a non-trivial example, try to figure out the minimum placement of terrain squares needed to force the player to step through one while pillar dancing in the following:
- Code:
.........
..##.##..
.........
.##.#.##.
....#....
.##...##.
....#....
.##.#.##.
.........
..##.##..
.........
Then create a generic algorithm that applies that terrain without applying more than is needed.
Also what happens when digging, does that create new Terrain squares (What if the player isn't creating a loop? Does it matter?)
Perhaps a simpler form of this effect can be achieved by having the player periodically take .4 extra to move creatures in LOS (Although moving while monsters are in LOS isn't a totally reliable indicator of "luring" either) that way you wouldn't have to worry about where the player was, only how many steps they'd taken. You could flavor it as the player "stumbles" or "ducks trying avoid an attack" or something, I would want to indicate that it's about to happen on the display somehow, as having it happen at unpredictable periods sounds really annoying, and having it happen at predictable increments would be worse, as you'd have to count steps so you knew. I'm not sure that has an easily solvable UI that isn't also overbearing, maybe a status light that said like "Sure steps(3)" indicating how may more steps you could take until you'd stumble or something? Or I guess it could be an unpredictable interval, but I don't think I'd enjoy not knowing how many steps I had to re position in combat safely.