Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upNPCs in city-less worlds really slow the game down #22270
Comments
Coolthulhu
added
NPC / Factions
Code: Performance
labels
Oct 27, 2017
Coolthulhu
changed the title
NPCs in city-less worlds really lag the game down
NPCs in city-less worlds really slow the game down
Oct 27, 2017
This comment has been minimized.
This comment has been minimized.
|
Could we drop it down to 1 overmap width as a stopgap measure? That's still quite a large area to scan (32400) to allow AI behavior and would cut down processing by a significant factor. |
This comment has been minimized.
This comment has been minimized.
It will decrease slowdonw, but won't really help as there are still no shops and houses in 1 overmap radius. I suggest npcs should traverse |
ZhilkinSerg
referenced this issue
Mar 11, 2018
Merged
Unhardcoded NPC destinations (using overmap locations) #23111
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Coolthulhu commentedOct 27, 2017
As reported in http://smf.cataclysmdda.com/index.php?topic=15122.0
"Wild" NPCs look for shops and houses to loot. When those don't exist, they fail to find something to do, meaning that their next action will be looking for something to do (ie. scanning for shops and houses to loot).
The radius for this scan is whooping 5 overmap widths -
(180*5)^2=810000tiles to check. And the per-terrain check is a string comparison.