Describe the bug
When calculating the density in a city for the purpose of spawning a building, the density seems to increase with the distance from the center.
The density at some location is currently calculated as: distance from city center / city radius × population factor.
This value increases with the distance from the center and the population size.
Intuitively, the density should be larger closer to the center, not at the edge.
See VoxelTycoon.Cities.CityBuildingSpawner.GetDensity(City, Xz), called from SpawnBuilding(...) in same class. Value used in TryGetSpawnInfo(...).
Actually, there is also DistanceToDensity curve sampling that converts distance to actual density by inverting the value and applying the easing. So it works right as you expected.
Describe the bug When calculating the density in a city for the purpose of spawning a building, the density seems to increase with the distance from the center.
The density at some location is currently calculated as: distance from city center / city radius × population factor. This value increases with the distance from the center and the population size.
Intuitively, the density should be larger closer to the center, not at the edge.
See
VoxelTycoon.Cities.CityBuildingSpawner.GetDensity(City, Xz)
, called fromSpawnBuilding(...)
in same class. Value used inTryGetSpawnInfo(...)
.Build version 0.86.0.0 steam
Platform Windows 10