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 ability to set mapgen vertical and horizontal limits separately. #6975
Comments
Not merely interesting, but given recent problems on my server, in some cases potentially vital. I cannot effectively utilise this setting because I need an upper y limit that is more than the horizontal limit I wish enforced, but my lower y limit can be far less than this. Ideal would be:
|
Of course we can overcomplicate everything with a bunch of new settings. But two are already enough for most cases: |
I honestly don't mind how it's done if it means that flexibility is there. |
|
This would be a nice feature to have. |
I'd call it |
Up! |
|
@Ezhh maybe? |
Will look at it. |
Based on what I figured out so far, you currently enter mapgen_limit = some number in minetest.conf, and that gets copied to map_meta.txt (this is, in my opinion, a really bad approach, but that's possibly another issue). From checking with paramat, the world then ignores minetest.conf for mapgen_limit and always reads it from map_meta.txt. (Please correct me if I have misunderstood.) If we assume we add two new settings, mapgen_limit_max and mapgen_limit_min, we need to make sure we keep compatibility for worlds using mapgen_limit. How do we want to do this?
This is... messy. I'd like some thoughts before going any further. |
Oops this really is not 'simple' now we've looked into it. I'm actually not sure how the settings system would cope with the backwards compatibility problem you've described, i've probably misled you. |
I'm only happy to add this feature if it can be done cleanly and simply, i'm still not sure if that is possible, but here's a better approach i might be able to support: Keep 'mapgen limit' but for horizontal only, no deprecation needed. Some things i realised: Engine spawning code, and probably more, assumes that (X = 0, Z = 0) exists in a world, i don't want to make this feature unnecessarily complex by allowing a world that doesn't include those XZ co-ordinates. So keeping 'mapgen limit' and having it act unchanged horizontally seems best. Vertically, biomes of games are very often defined around a sea level at y = 1. So i disapprove of the minp, maxp approach. The world must continue to contain (0, 0, 0). |
Let's say we add mapgen_y_limits = (min, max). Are we going to assume these are two non-negative numbers then add the negative via the code to enforce the inclusion of 0? Secondly, assuming we've made sure we keep 0 y present somehow, we've now just shifted the earlier problem to y only, because both mapgen_limit and mapgen_y_limit will be written to map_meta.txt, even if using the defaults. How do we decide which of the two values to use? Just going for a "whichever is lower" would be possible, but then we're probably back to messy again. Alternatively we could check mapgen_limit against MAX_MAP_GENERATION_LIMIT and switch to mapgen_y_limit for y if those match? |
First question yes, since the horizontal value is a positive value measured outwards from (0, 0). Second, yes this is what i've been thinking about too. Erm, maybe set the y-limits to an unusable value like So the 3 values checked against are first set to mapgen_limit, then if both y-limits are non-NULL / non-0 / < 0 use those for y. I'm also wondering about whether to have 1 or 2 y-limits. It somewhat makes sense to have 2 as in a world up is often so different to down, whereas sideways is usually the same. It often only makes sense to go 1000-2000 up for mountains, while down is often to -31000. |
Similar direction to what I've been thinking. Independent y limits, rather than z/x, is my main interest, so I don't mind only having options for that, but I feel that unless +/- y can be distinct the worth of this drops a long way. Someone can easily want a game that doesn't involve much digging but has space exploration (I've somewhat gone this way on RC), while another might be all about the digging and therefore want depth, but very little height. |
@Ezhh: KISS.
Splitting the X, Y, and/or Z axis to limit the map is nonsense; it fits so easily into two position settings. |
There is no "does not exist" case, unless my understanding is wrong. After world creation, mapgen_limit is always present in map_meta, even if you don't have it in minetest.conf (it will just take the default). I had rejected just taking the lowest value because it didn't feel like that would be supported, but if you are fine with that, I might look at that option again. |
Taking the smaller does not work, as sometimes you will want the larger of new and old settings. I feel more consideration of need is necessary before going ahead. One good thing about looking at this is that we are now properly assessing it, which i didn't do before. |
Thought some more, i think this is a useful feature and if we're going to do it it's worth doing it completely using 'minp maxp' for complete control, as long as we have the limitation of (0, 0, 0,) is always present. This has the advantage that we can use 2 vectors instead of a larger number of scalars. |
Issue type
Minetest version
Summary
We have a fantastic option that allow us to limit the maximum map size from the centre.
However, I do believe it would be rather interesting having the ability to set y axis independently. Moreover, it would be very important to be able to adjust specific upper and lower y limits independently.
The text was updated successfully, but these errors were encountered: