Changes to scent, zombies, zombie dogs, noise, and hiding in town

Just some thoughts:

Firstly, I don’t mind zombies being fairly dumb and easy to lose. I feel like zombies are one of those enemies that tend to be trivial to deal with until suddenly they aren’t. Their strength is in their numbers and dogged, relentless determination. Combine that with a refocus of the zombie dogs toward hunting down the player and summoning the horde and you have a pretty good combination of overwhelming numbers and ‘intelligence.’ Also it would help if zombies had some kind of a searching behavior. Right now they kind of stop what they’re doing when they lose track of you. The only reason they can follow you into houses and things is due to the smell mechanic. I’d rather see the zombies get some kind of a search behavior where they know the last square you were in and what square you moved into and then coordinates a brief search.

For example, if you are chased down an alley and run around the corner to the left, the zombie will chase you to your last location and then start searching left if it cannot see you. The goal of the search might be to expose a certain amount of terrain to its sight radius. Perhaps 100 tiles (just for the sake of a number). That way it will move left until it has uncovered 100 tiles worth of terrain, which will passively let it look through windows and down alleys as it moves, possibly spotting the player inside a house or down an alley, or hearing the player moving on the other side of a wall. This is, essentially, a ‘dumb’ search. Almost like a purely mechanical probe. But that is sort of what we expect from zombies. Easy to trick one of them, harder to trick the horde.

In order to improve the search mechanic what could be done is that if multiple zombies are searching within a certain radius of each other, the MOST RECENT sighting of the player by any one zombie would be transmitted to all other searching (maybe even non-searching?) zombies in that radius. The horde hunts as one.

To talk about scent itself, I like the idea. Especially if the scent mechanic is refocused to aid the zombie dog (and wild animals of course). Soap could lower the character’s scent rating for a time. Rain and smoke could mask and deteriorate scent trails.

I feel like the scent tiles should have a random chance of shifting every turn to an adjacent tile. So that over time scent trails don’t just weaken but warp. Better yet, add ‘wind’ to the game that varies in direction and intensity and will move scent trails dynamically in an appropriate direction (and weaken them as winds get stronger).

Finally, add shallow brooks to the worldgen. Waterways you cannot drown in (not deep enough) but completely mask scent trails, so you can use them as ways to break off hunting animals and ZDs.

A couple suggestions:

For the player knowing that dogs can smell them: have them bark when they start following a trail. Serves the purpose of getting both the player’s and other zombie’s attention.

As for hyena’s proposal, sounds good, but would prefer it slightly less hive-mind-y: just have zombies notice if one of their own spots the player and breaks ranks- making a hard left towards a window & snarling. Have the horde follow it instead of transmitting the player’s exact coordinates, and give them a % chance of noticing instead of everyone automatically knowing.

Also ties into the zombie dog- the bark catches attention, dog goes off in a direction and nearby zombies, (who all noticed it thanks to the bark), follow it.

I think this change would also require zombies enter the basic “search” behaviour described if in an agitated state. So if a dogs howling at a door, even if the zombies can’t detect the player inside, they will start “looking” for them in a very basic way.

So even if the player takes out the dog after the first howl, the zombies in the area will not be “agitated” and begin milling about hoping to get some idea of where the player is, listening intently for sounds and looking for glimpses… making things more dangerous for the player, escape-wise, but not impossible.

Definitely agree that scent needs a rework right now. As is it basically works like “zombie catches player’s scent->zombie becomes inescapable stinger missile”. Scent tracking right now is way too powerful and definitely needs to be reworked.

It might also be worthwhile to take the opportunity to add in a basic priority of senses for monsters in the json, something like “smell:50”, “sight:20”, “hearing:90” which would determine both what senses prioritize over others when a monster is chasing you and how strong each monsters’ senses are (thus replacing the VIS40-type flags as well as “SEES”, “HEARS”, and “SMELLS” flags).

Giving the zombies different ‘states’ wherein they exhibit different sensory behaviors would also be good. If a zombie is unaware - standing motionless for example - then their senses are quite limited and they are relatively easy to avoid. If they are alerted by another enemy to the player’s presence they could go into an ‘aware’ state where their hearing and sight range is enhanced and they are performing a basic search; they are aware there is prey somewhere nearby and are paying more attention. If the zombie is avoided for long enough they return to an unaware state.

The system Glyph suggests is incredibly realistic and fun, in my opinion. But really zombies need to forget about smelling? I think having them smell like in Rogue Survivor would be great, if here we had a good scent system.

The difference is that right now monster’s with the ability to smell can always find you if they catch your scent, regardless of how far you run. That’s an obvious bug, though it isn’t very noticeable right now as most of the times when monsters can catch your scent they can already see you. You know how it seems like zombies can always find you in the dark? For the most part that isn’t due to their ability to hear your footsteps, but rather is due to the fact that at some point or another they smelled you.

But IRL, if i recall correctly, things start to smell when they suspect something. What about making them smell only when they hear you?

???
While humans tend not to pay too much attention to their sense of smell while their sight and hearing are active, it does still work (it’s not like your sense of smell just magically switches off unless you are focusing on it). Also many animals such as dogs or wolves will actually take their sense of smell over their sense of sight, and will follow their nose even if it leads a different direction than the apparent one according to sight.

But humans don’t. And if we make it the most hard sci fi posiible, human brains are not made to smell or prioritize smell, even less if they don’t need to use it.

Can someone try and quantify “scent is too good”? As it is it’s hard to propose any fixes because no one is describing what results they want.

One observation, people seem ok-ish with monsters with extra-special smelling (wolves, dogs, zombie dogs) working the way they do, is that right?

I’ll fire off some stuff at random:

  1. Too fast when tracking via scent. Can address by making zombies (monsters with SMELLS, but not GOODSMELLS) pause frequently when tracking by scent.
  2. Scent distance too far. This is a likely one, the difference between SMELLS and GOODSMELLS is currently being able to smell at 1 vs 2, it should probably be more like 1 vs 100 or so. This way the effective range of the scent cloud would be fairly short. (to try this, go to the first line of monster::scent_move() in monmove.cpp, and change int max_smell = 2; to int max_smell = 100;, see how that works.) This would, however, mean zombies would rarely if ever smell you through a door. (maybe a plus? not sure)
  3. Zombies shouldn’t have scent ability at all. This is the extreme of course, if you manage to break LOS to zombies, and keep quiet, you’ll lose them every time. (I need to take myself up on “just try it”, it might play just fine) Anyone can try this out by editing the data/json/monster.json file and just nuking the zombie SMELL flag.

I’d be fine with both 1 and 2. 3 is an overkill IMHO.

The problem is that scent creates the “missile seeking behaviour” i2amroy described, where they find your exact position flawlessly, making hiding, evading, any sort of close-up-tension feeling impossible. I want to be able to hide from zombies and use the night to my advantage.

Another problem is that changing how well or poorly an animal smells has NO effect on this behaviour whatsoever. They are still able to tell EXACTLY where you are as soon as they catch your scent, and never lose you. I want zombies to be able to smell, but I want smell to make them agitated and enter search mode in the general area of the smell, not become an instant unstoppable character seeking missiles. So hiding is possible, but the zombies losing sigh of you shouldn’t drop them right back into passive mode. They should know you’re around and be looking for you, they just shouldn’t be able to find your EXACT position.

The third problem is distance, but the exact opposite of the problem you just described. The drop off for scent to matter is incredibly small, to the extent that animals with good smell don’t even matter. It’s also remarkably lacking in persistence, fading in a few turns. Basically smell doesn’t matter in any of the ways smell should matter - it can’t draw enemies closer to search your area, things can’t really follow your trail, it doesn’t change their behaviour (until turning them into a missile).

The result is that smell is simply “If an animal is close enough they know exactly where you are” which just… isn’t nearly as fun as it could be and should be. And changing the distance at which this behaviour occurs isn’t a good solution.

Pretty much. The problem isn’t that zombies or other monsters have an ability to smell that’s too strong or too weak, the problem is that the way that the game currently handles, creates, spreads, and decrements scent clouds is both unrealistic and badly broken.

And it’s easy to see how the system COULD be so much better and more interesting, allowing for a variety of behaviours that could lead to tense situations and interesting choices.

An “easy” solution I’ve been thinking of would be to have limited scent sensation actually cut from the top and bottom of the scent cloud, and have tracking animals aim to move to higher smell areas. Creatures would have the ability to “detect” the scent in neighbouring squares as well.

Smell: 0 - Can’t detect scent at all.
Smell: 1 - Can detect scents at density 5 and above, but can’t detect where the scent is coming from. Will hunt within the area of 5 scent and higher, but not know exactly where the player is.
Smell: 2 - same as above, but detects the player at 4 scent, and can tell the difference between a scent of 4, 5, and 6, meaning they will close in until they get to an area of “high” scent on the part of the player.
Smell: 3 - same as above, but starts at 3 and differentiates up to 7.
Smell: 4 - same as above, but starts at 2 and differentiates up to 8.
Smell: 5 - Since the only square like to have 9 smell is the players square and squares directly adjacent to it, this results in the current “heat-seeking” behaviour where the creature will be able to follow the scent directly to the players position.

So generally critters that are “tracking” would attempt to move to areas of higher smell, and then try to search for the player visually to narrow down their exact location.

It would also be nice to have scent diffuse a little more, starting with a single high scent point (I think right now the game uses a circle centered on the player rather then a point) with slower decay as opposed to the extremely rapid stuff we have now. It might also be worth it to look into having smoke actually decrement the scent amount present in a tile rather than just dropping it down to zero.

Both are changes I’d like to see, yes.

[quote=“GlyphGryph, post:33, topic:3591”]The problem is that scent creates the “missile seeking behaviour” i2amroy described, where they find your exact position flawlessly, making hiding, evading, any sort of close-up-tension feeling impossible. I want to be able to hide from zombies and use the night to my advantage.
Another problem is that changing how well or poorly an animal smells has NO effect on this behaviour whatsoever. They are still able to tell EXACTLY where you are as soon as they catch your scent, and never lose you. I want zombies to be able to smell, but I want smell to make them agitated and enter search mode in the general area of the smell, not become an instant unstoppable character seeking missiles. So hiding is possible, but the zombies losing sigh of you shouldn’t drop them right back into passive mode. They should know you’re around and be looking for you, they just shouldn’t be able to find your EXACT position.
The third problem is distance, but the exact opposite of the problem you just described. The drop off for scent to matter is incredibly small, to the extent that animals with good smell don’t even matter. It’s also remarkably lacking in persistence, fading in a few turns. Basically smell doesn’t matter in any of the ways smell should matter - it can’t draw enemies closer to search your area, things can’t really follow your trail, it doesn’t change their behaviour (until turning them into a missile).
The result is that smell is simply “If an animal is close enough they know exactly where you are” which just… isn’t nearly as fun as it could be and should be. And changing the distance at which this behaviour occurs isn’t a good solution.[/quote]
Our implementation is actually an extremely accurate model of how scent works, scent diffuses from its source (setting up a steady gradient of scent strength), and animals that can track via scent can tell which direction has the strongest scent. Put those two together, and you have the scent-tracking behavior we see in the game. But, this gave me an idea!

Another possibility is to cap the MAXIMUM scent strength at which a monster can discern differences, so if they get within a certain range of the source, they become unable to discern the direction, so have to use other methods of tracking. That way a dog tracking you at night would perhaps follow 10 squares back or so, but wouldn’t be able to track to your position unless it heard or saw you.
Illustrated: (it’s more blobby than this, and with a larger scale)

000000000000000000000
011111111111111111110
012222222222222222210
012333333333333333210
012344444444444443210
012345555555555543210
012345666666666543210
012345677777776543210
012345678888876543210
012345678999876543210
0123456789@9876543210
012345678999876543210
012345678888876543210
012345677777776543210
012345666666666543210
012345555555555543210
012344444444444443210
012333333333333333210
012222222222222222210
011111111111111111110
000000000000000000000

So, we can set thresholds for both the inside and the outside, basically if a square is below threshold A, the monster can’t tell which direction is better, so the scent check totally fails. Likewise if the square is above threshold B, it also can’t tell a direction. In both cases, it falls back on the default behavior. Also, there’s nothing keeping us from making items smell like the player, in which case they could be used for misdirection.

If you’re running, the effect is even more pronounced, because you’re leaving a strong scent trail behind you, and that will foil the monster at a greater distance than if you stopped and the scent cloud recentered on you.

I don’t understand this, stick a treat in a closet, or in the fold of a blanket, and a dog will find it in a “heat seeking” manner exactly as it happens in the game. As I pointed out, some issues include poor differentiation between “good” and “really good” scent ability and monsters being able to move at full speed while following a scent, but the foundational scent diffusion model is how it actually works IRL.

It’s diffusion plus an ability of animals to tell the direction in which the scent is stronger.

Also, there is only a “point scent” in the game, each turn the square the player is standing on is incremented to match their scent value, then a pass of a diffusion algorithm is run over the scent map.

Anyway, the proposed fixes will address all the issues that have been brought up, and they’re actually really easy to add. I’ll get a branch out that people can poke at asap.

It doesn’t count as a revelation if you just repeat what someone wrote in the post before you, you know. :wink: