-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Increase maximum number of biomes above 255 #9694
Comments
Unrelated, but before any underlying changes are made to mapgen(s) it'd be good if #9627 could be merged first. |
i agree with sfan5, and we should ensure that we don't serialize the biome id somewhere as u8 |
#9627 is merged, will start work on this. |
just a question, in which case we can have more than dozens of biimes, that sounds a little bit crazy, no ? |
MTG has 43 biomes already. Remember that each heat/humidity point has multiple vertically-stacked biomes. This was explained in the first post. u8 was chosen many years ago when mgv6 was still dominating people's thinking and people were not really thinking about vertically stacking biomes. |
Hmm something weird ... I wrote a mod to test that > 255 biomes works, for when i make a PR:
I ran this mod in recent master with 511 biomes registered to see how master breaks in this situation. Resulting map has all 8 colours in very roughly equal proportions: Resulting printed list apparently has 511 entries:
Mod code (use with MTG, mod depends on 'default'):
|
I get a feeling my way of testing is deceiving. I get a feeling that on mod load, the number of registered biomes is unlimited, but when the environment starts the number of biome IDs may be limited to 255. Will test further. |
Added another test to my code:
Getting the biome ID from name only works after environment startup. |
Ugh, more testing. Still suggests all 511 biomes are functional in a world , but i cannot see how. |
Tested in a more reliable way in master, again suggests > 255 biomes can be functional in a world. Still wondering if my testing is misleading me. |
Interesting discussion from past IRC that might be the answer: 14:52 Krock biomes have an internal index due to their inheritance, but we've also got biome_t which is u8, whereas the index is u32. |
Ah ... if you do a search for 'biome_t', that is only used for the value type of the mapgen object biomemap. This suggests that the only limitation to 255 occurs in the biomemap, which i have not tested yet. Will test, and this suggests a way to test the PR too. |
This is something i would like to do, opening an issue in case there is useful input or any objections.
https://github.com/minetest/minetest/blob/7539267d370ae9a1b547008a937bd7f57bece541/src/mapgen/mg_biome.h#L35
I suggest u8 -> u16.
During discussions on the forum, i have become aware of some users who are approaching the limit of 255 biomes. Also, i have become aware of, and sometimes think of, certain useful biome system design techniques that require large numbers of biomes (for example, multiple identical biomes each with slightly differing heat/humidity points, in order to create a desired distribution).
Some biome system designers are approaching roughly 32 surface biomes, which is reasonable. Now consider that each heat/humidty point could possibly have a vertical stack of underground and high altitude biomes, a stack of 8 is reasonable. 32 * 8 = 256. So it is entirely reasonable to allow over 255 biomes, and this creates some interesting new possibiliites.
The text was updated successfully, but these errors were encountered: