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

fix: building placement in parcels #105

Merged
merged 1 commit into from
Sep 1, 2021
Merged

Conversation

jdrueckert
Copy link
Member

No description provided.

@jdrueckert jdrueckert added Type: Bug Issues reporting and PRs fixing problems Category: Gameplay Content Requests, Issues and Changes targeting gameplay mechanics and content Topic: Stabilization Requests, Issues and Changes related to improving stablity and reducing flakyness labels Aug 31, 2021
@jdrueckert jdrueckert self-assigned this Aug 31, 2021
Copy link
Contributor

@skaldarnar skaldarnar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DynamicCities determines the minimal and maximal parcel size by looking at the sizes of availbale buildings. The parcel size later gets encoded in the shape area.

When requiring the building size to be strictly smaller than the shape extents we end up with an "off-by-one" error.

This becomes most apparent if there's only a single building of fixed size, e.g., 10x10. During settlement generation we'll create parcels of size 10x10 (as that's the only available building we have anyway), but later check that the buildings to place are at max 9x9.

Doing an inclusive check with less-or-equals (≤) fixes this.

@skaldarnar skaldarnar merged commit c170011 into develop Sep 1, 2021
@skaldarnar skaldarnar deleted the fix/building-placement branch September 1, 2021 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Gameplay Content Requests, Issues and Changes targeting gameplay mechanics and content Topic: Stabilization Requests, Issues and Changes related to improving stablity and reducing flakyness Type: Bug Issues reporting and PRs fixing problems
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants