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

Very long stalls during town generation #7274

Closed
SamuXarick opened this issue Feb 24, 2019 · 4 comments
Closed

Very long stalls during town generation #7274

SamuXarick opened this issue Feb 24, 2019 · 4 comments

Comments

@SamuXarick
Copy link
Contributor

Version of OpenTTD

1.9.0-beta2

Expected result

Don't take/stall too long

Actual result

Very long stalls during town generation

Steps to reproduce

Launch OpenTTD
Click Settings, set these settings:

  • Landscape: Temperate landscape
  • Land generator: Original
  • Proportion of towns that will become cities: 1 in 1
  • Initial city size multiplier: 10
    Close window
    Click New Game, set these values:
  • Map size: 4096 * 4096
  • No. of towns: High
  • Sea level: Medium
    Click Generate

Notice the number of stalls occuring during Town generation, usually past 3500. The frequency keeps increasing and increasing...

@SamuXarick
Copy link
Contributor Author

town names are english

@Eddi-z
Copy link
Contributor

Eddi-z commented Feb 24, 2019

most likely the town name generator running out of names.

@andythenorth
Copy link
Contributor

Duplicate of #5864

Related to

May or may not be resolved by #7059

@andythenorth
Copy link
Contributor

andythenorth commented Feb 25, 2019

@SamuXarick found causes for this which aren't the name issue. Needs the issue updating, thanks.

See #7250 (comment)

SamuXarick added a commit to SamuXarick/OpenTTD that referenced this issue Feb 26, 2019
SamuXarick added a commit to SamuXarick/OpenTTD that referenced this issue Feb 26, 2019
SamuXarick added a commit to SamuXarick/OpenTTD that referenced this issue Feb 26, 2019
SamuXarick added a commit to SamuXarick/OpenTTD that referenced this issue Feb 26, 2019
PeterN added a commit to PeterN/OpenTTD that referenced this issue Feb 26, 2019
…acent tile ownership, not nearest town.

The existing test performed badly with a large number of towns due to having to calculate the
nearest town, and also by its nature assumed a bridge was built by the nearest town, leading
to bridges of nearby large towns be removed incorrectly.
PeterN added a commit to PeterN/OpenTTD that referenced this issue Feb 26, 2019
… adjacent tile ownership, not nearest town.

The existing test performed badly with a large number of towns due to having to calculate the
nearest town, and also by its nature assumed a bridge was built by the nearest town, leading
to bridges of nearby large towns be removed incorrectly.
SamuXarick added a commit to SamuXarick/OpenTTD that referenced this issue Mar 3, 2019
@PeterN PeterN closed this as completed in ebc3934 Mar 3, 2019
nielsmh pushed a commit to nielsmh/OpenTTD that referenced this issue Mar 11, 2019
… adjacent tile ownership, not nearest town. (OpenTTD#7284)

This only affects failed town generation, as towns do not delete bridges under any other circumstances.

The existing test performed badly with a large number of towns due to having to calculate the
nearest town, and also by its nature assumed a bridge was built by the nearest town, leading
to bridges of nearby large towns be removed incorrectly.

If we gain the ability to quickly retrieve the correct town (which is _not_ the nearest town) from the bridge, this change should be reviewed.
SamuXarick added a commit to SamuXarick/OpenTTD that referenced this issue Apr 14, 2019
douiwby pushed a commit to douiwby/OpenTTD that referenced this issue Apr 16, 2020
… adjacent tile ownership, not nearest town. (OpenTTD#7284)

This only affects failed town generation, as towns do not delete bridges under any other circumstances.

The existing test performed badly with a large number of towns due to having to calculate the
nearest town, and also by its nature assumed a bridge was built by the nearest town, leading
to bridges of nearby large towns be removed incorrectly.

If we gain the ability to quickly retrieve the correct town (which is _not_ the nearest town) from the bridge, this change should be reviewed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants