-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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 lake shore mapgen corner case #70234
Fix lake shore mapgen corner case #70234
Conversation
In my original implementation, I overlooked the scenario where a lake shore was bounded on the cardinal directions by river banks and had a lake on the diagonal that bounded the river banks. As a result, the mapgen would not draw any shoreline and just fill the whole location with water. There are still lots of weird interactions at the confluence of lakes and rivers but this fixes the most egregious one.
This corner case it's just a very tip of the iceberg, there's at least few more patterns which doesn't align well. |
Interesting. Like you (and I) had mentioned, ultimately we'll have to revisit rivers (and now oceans here) to make them all cleanly integrate. I don't think the iceberg is quite that big, but I agree there are more. I'll give your changes a deeper read here at some point. When I did this years ago, I was pretty happy with the final result but you can seen in my comments that I got frustrated coming up with something that looked good and wasn't a bunch of conditionals and ultimately punted, so if this meets the criteria that'd be nice...
|
I'd be interested in chatting on discord at some point about how we might do this better. I think I've got some really fuzzy ideas now, but I don't know because it was a hard weekend and I'm very tired. |
Summary
None
Purpose of change
Fixes #38036
Describe the solution
In my original implementation, I overlooked the scenario where a lake shore was bounded on the cardinal directions by river banks and had a lake on the diagonal that bounded the river banks. As a result, the mapgen would not draw any shoreline and just fill the whole location with water.
I also ported this change into the ocean shore code that is derived from this.
Describe alternatives you've considered
None. Ultimately we'll want to revisit the overmap level generation and its handling of the confluence of rivers, lakes, and oceans to not just play whack-a-mole (as much) with weird generation, but this issue is just a legit oversight in my original implementation.
Testing
Set up a test scenario that went through the cases and checked it out:
Also teleported around and looked for this particular case occurring naturally. There are still lots of weird interactions at the confluence of lakes and rivers but this fixes the most egregious one.
Additional context
Before
After