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

Remove unnecessary roofs from steel mill for shadowcasting performance #72546

Merged
merged 1 commit into from
Mar 23, 2024

Conversation

SurFlurer
Copy link
Contributor

@SurFlurer SurFlurer commented Mar 22, 2024

Summary

none

Purpose of change

Address #72508

There are many unnecessary roofs in the steel mill. Roofs mark map squares as indoors, thus weather sight penalty isn't applied on those squares' transparency values. But in this case, the map structure creates too much fluctuations in transparency, thus shadowcasting starts struggling.

Describe the solution

Remove most roofs that are supposed to be outdoors.

Describe alternatives you've considered

  1. Improve shadowcasting performance: I tried and came to the conclusion that I'm not capable enough to do that.
  2. Improve the algorithm of identifying whether a map square should be subject to sight penalty: this really should be done ( in hope of fixing 3D shadowcasting bug for weather with sight_penalty != 1.0 #65205 ), but it takes time more than this simple solution.

Testing

Newly generated steel mills no longer suffer from degraded shadowcasting performance. Note that already explored steel mills aren't salvageable.

For comparison, below are pictures of the second floor of the steel mill, before and after the change.

before:
orig

After:
new

Additional context

@github-actions github-actions bot added [JSON] Changes (can be) made in JSON Map / Mapgen Overmap, Mapgen, Map extras, Map display astyled astyled PR, label is assigned by github actions json-styled JSON lint passed, label assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions labels Mar 22, 2024
@Maleclypse Maleclypse merged commit ece32e4 into CleverRaven:master Mar 23, 2024
25 of 29 checks passed
@SurFlurer SurFlurer deleted the steel_mill branch August 30, 2024 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions [JSON] Changes (can be) made in JSON json-styled JSON lint passed, label assigned by github actions Map / Mapgen Overmap, Mapgen, Map extras, Map display
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants