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

a temperature and a white/blacklist system, to set which biomes and regions can spawn close to each other #996

Open
Ielelele29 opened this issue Jun 22, 2023 · 5 comments
Assignees
Labels
IRIS 3 This is the branch for Iris 3 things. Overworld Plugin

Comments

@Ielelele29
Copy link

Adding, Removing, or Changing

Adding

Type of Modification

Biome and regions generating system

What are you trying to modify

My proposal is divided into 2 parts:

  1. Add a system like the temperature one that exists for the biomes of a region, but between regions (or if something already exists that allows you to do it, I'd like to find out what it is; I couldn't find anything on the wiki).
  2. A whitelist/blacklist system whereby biomes and regions can spawn close to each other following those restrictions strictly. Let's say a more extreme version of the temperature system.

Alternatives

No response

@svdgoor
Copy link
Collaborator

svdgoor commented Jun 22, 2023

Temperature system is very difficult to achieve in Iris. Conditionally spawning biomes besides eachother is not an easy feat
This would actually be impossible with the noise we are currently using.
The way this would be implemented is a heat map (some areas 'hot' and others 'cold'), so a whitelist/blacklist system would still not work in those conditions.

I was working on a system for temperature a while ago but it's very cognitively challenging to keep track of what is happening with all the biomes.
I will add this (back) to my list of maybe-something-for-the-future's, and we'll see.

@svdgoor
Copy link
Collaborator

svdgoor commented Jun 22, 2023

If you want me to explain exactly (in technical terms) why this is the case, then let me know and I'll give it a shot.

@Ielelele29
Copy link
Author

Being a developer myself, yes, I'd be interested in understanding something more, even if I don't know that much about the API for generating the world. I opened this issue mostly because it happens to me that, for example with the new horizons pack, permafrost regions are generated next to the desert regions, and let's just say that they aren't exactly the best to see; then the rest would be a plus.

@svdgoor
Copy link
Collaborator

svdgoor commented Jun 23, 2023

Ok so what our generator has is a straightforward heatmap.
The heatmap is cellularized so that the regions place decently.
image
Looks a lot like this

These tiles border eachother, but there are also instances where the darkest tile borders a very bright one, which makes it that even if you assign these outermost values to the regions you dont want to place besides eachother, they can still spawn besides eachother.

Then there is something like perlin noise, which looks something like this
image
Here, we could say that each specific shade between red and blue is a specific region, but then you get a desert area, surrounded by the next region, by the next region, by the next region, all the way to the frozen regions, which looks horrible.
Then what you can do, what I was working on in an attempt to resolve this, is group together regions that are of similar temperature (e.g. tropical and hot or swamp and tundra), and then applying the same principle but with larger grouping. Visualizing this becomes very challenging and I'm not able to fire up a server to show this with some colors right now.

This solution above is what I believe has the highest chance of looking good, achieving what we want, BUT

  1. Adding regions becomes more of a challenge because a) finding a good spot for them is difficult, you cannot just add it to the list and b) adding a region to a grouping with other regions makes the other two regions less likely to spawn, which is not desirable
  2. The cognitive complexity of the way that regions are generated becomes much higher. If you had a hard time following along with the explanation above, imagine having multiple of these noise styles interacting from multiple different files you cannot all comprehend at the same time, especially if you did not first read this post
  3. The performance effects of stacking an additional layer of complexity is quite significant. Polling through 3 layers of noise as opposed to 4 is challenging. The effect of this are mitigated by the fact that the current noise for region placement is very complex in terms of compute, so if we take it and replace it by 2 'easier to compute' noise styles the performance may even increase.

@svdgoor
Copy link
Collaborator

svdgoor commented Jun 23, 2023

for 1. I have come up with a solution: For each region in the region group, add a copy of the region group to the list of regions in the dimension

@svdgoor svdgoor added Overworld Plugin IRIS 3 This is the branch for Iris 3 things. labels Jul 10, 2023
@svdgoor svdgoor self-assigned this Jul 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IRIS 3 This is the branch for Iris 3 things. Overworld Plugin
Projects
None yet
Development

No branches or pull requests

2 participants