-
Notifications
You must be signed in to change notification settings - Fork 8
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
Add temperature and humidity values to biome #8
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good from the technical point of view now, but my concerns raised in Terasology/BiomesAPI#5 (comment) become apparent here.
We have an implicit conversion going on in BiomeProvider L68-77, interpreting the abstract facet temperature values directly as biomes. The relation of these numbers does not necessarily match with the relation of temperatures and humidity defined here.
On the other hand, maybe that's a good thing, and we should completely forget about the underlying facet temperature noise ... 🤔
OCEAN("Ocean"), | ||
BEACH("Beach"), | ||
PLAINS("Plains"); | ||
MOUNTAINS("Mountains", .3f, .09f), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks way better from the technical perspective now 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems reasonable, just a couple trivial comments :-)
I haven't fully been up to speed with all this, but I guess with this PR we start tracking two new things per-block for just about any setup (since CoreWorlds is so fundamental). Are we concerned at all about memory usage / performance due to that change?
Rect2i processRegion = facet.getWorldRegion(); | ||
for (BaseVector2i position : processRegion.contents()) { | ||
// clamp to reasonable values, just in case | ||
float noiseAdjusted = TeraMath.clamp(humidityNoise.noise(position.x(), position.y()) + .6f, 0f,1f); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are reasonable values, anyway? Not sure what the numbers here mean, may be good to name them via constants? There's also a space missing after 0f,
for a quick trivial style fix :-)
for (int i = 0; i < noise.length; ++i) { | ||
noise[i] = TeraMath.clamp((noise[i] * 2.11f + 1f) * 0.5f); | ||
for (BaseVector2i position : processRegion.contents()) { | ||
// modify initial noise |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Modify it how though?
After some more testing I have a feeling there's a severe bug related to the extra data being added to CoreWorlds when a secondary client attempts to join a multiplayer game (leading to protobuf, network communication, and so on). Log below. This does not happen with FlowingLiquids in a similar multiplayer setup, despite also using
|
This adds a temperature and humidity value to each CoreBiome - it's required for Terasology/ClimateConditions#18 to work. It also relies on Terasology/BiomesAPI#5.