CleverRaven / Cataclysm-DDA

Cataclysm - Dark Days Ahead. A turn-based survival game set in a post-apocalyptic world.
http://cataclysmdda.org
Other
10.61k stars 4.17k forks source link

NPCs ignore sounds while they are outside the players FoV #76317

Closed dev-dsp closed 1 month ago

dev-dsp commented 1 month ago

Describe the bug

I've noticed this for several weeks now, updating periodically. Not sure if it's a known bug. It works perfectly at night. Just blow something up, wait 30 minutes, and then go to the nearest Z party. They suddenly start running towards the explosion.

Attach save file

N/A

Steps to reproduce

  1. Go to the nearest city full of Zs
  2. Attract just one Z so that he can see you
  3. Move ~15-20 tiles away from the city
  4. Kill the pulled Z with something loud
  5. Walk around again away from the city (note some Zs still may go to the sound source)
  6. Wait until nobody is running towards you
  7. Go back to the city
  8. Suddenly a horde of Zs rushes (esp. funny when it's the night and they run past you) to the place from where you were shooting the first one

Expected behavior

I expect that once they hear the sound, they rush to it, even if you don't see them.

Screenshots

No response

Versions and configuration

Additional context

No response

CoroNaut commented 1 month ago

I believe you are giving the behavior of the reality bubble. It is a limited area around the player in which zombies and npc's are active. Outside the reality bubble, the zombies are there, just not actually being animated or interactive. When the explosion creates the loud noise, all the zombies in the reality bubble can hear it. When you move away fast, a lot of zombies would simply leave the reality bubble and go dormant, but keep their memory. When you move back, they activate and continue walking towards the explosion.

The reality bubble acting this way is intended and intentional. For every tile that we extend the reality bubble, the actual tiles that are calculated go up, which means its harder on the CPU. This isn't configurable.

PatrikLundell commented 1 month ago

The size of the reality bubble is nominally a 60 tile radius around the PC. "Nominally" because terrain is loaded in 12 * 12 tile chunks, and some things depend on whether the terrain is loaded, while others use a fixed radius. This means the bubble may reach up to 71 tiles in some directions at times and for some purposes.

RenechCDDA commented 1 month ago

Please attach a save for this issue. As others have described this sounds like the expected mechanic.

dev-dsp commented 1 month ago

Indeed now it sounds more like expected, but I don't remember it being that visible previously. I mean, is it expected for zombies ~15 overmap tiles (I guess chunks?) away from what's just a 50 cal shot to "hear and remember" it? The most recent situation was when I was 6 tiles away from 9x9 city, and they kept running towards me (=shot) even when I reached the city "end" (looking from my original position). I'll try to reproduce it and come back with a savefile, sure..

dev-dsp commented 1 month ago

Indeed doesn't look like a bug, probably just me changed play style /shrug.