Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPCs in city-less worlds really slow the game down #22270

Open
Coolthulhu opened this issue Oct 27, 2017 · 2 comments

Comments

Projects
None yet
3 participants
@Coolthulhu
Copy link
Contributor

commented Oct 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=810000 tiles to check. And the per-terrain check is a string comparison.

@Coolthulhu 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

@Kole6738

This comment has been minimized.

Copy link
Contributor

commented Oct 29, 2017

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.

@ZhilkinSerg

This comment has been minimized.

Copy link
Contributor

commented Feb 20, 2018

Could we drop it down to 1 overmap width as a stopgap measure?

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 field overmap terrain in worlds with CITY_SIZE = 0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.