Cubic Chunks: Reduced lag, infinite height, and more [The #1 Suggestion Thread of all time!][Updated! 6/14]
Poll: Which parts of this system do you like?
Ended May 15, 2014
Poll: Which parts of this system do you NOT like?
Ended May 15, 2014
Poll: Do you support this system's implementation overall? (If yes, if
Ended May 15, 2014
A Round world
Problem- Completely ruins the infinite world in all directions
Half-advantage- Tid bit more realistic
Adcantage- you can have half the world in sunlight and the other half in darkness.
Possibilities- you could have a cave system connected from one end of the world to the other and the "moon" could be the end, with the dragon stuck on it and you could sorta have a outter space deal.
And as the center of the world, you could still have a lava core and maybe use that as a giant portal and either pass through it or if it kills you and transport you to the nether
also you should check out Link Removed
Actually, the lighting problems seem to be getting worked out. Just check in the last few pages. There has been discussion on how this concept could be tweaked to work properly.
I do believe this is the best mod in minecraft (besides world edit) and it will probably stay that way. This literally changes the way this game works, and i cant wait to have it especially for 1.6.4. I love making 1:1 scale cities such as New York but the height map is always the problem. Thanks to everyone who is contributing to this!
Note that this Post is written for the programmers in this thread.
Things might go deep into technical details.
Time to read!
I just got the crazy Idea of keeping the 'column' principle for the chunk-system, but allow to dynamically load/unload chunk-sections from it as needed.
That would cut ONE problem away:
Iterating trough the massive list of 3D-chunks that would have to be kept in a list while updating the heightmap.
If you where to keep all the cubic-chunks in a single list (or split up by cubic regions), you will have the problem that iterating a set of them in a column takes a ton of time, since you need to go trough that list of chunks and find all the chunks that are one the given x+z corrdinate. And now think of what happens if there is a real hellton of chunks loaded, like a few ten-thousand. For one, to do the updates for all these chunks, you will have to iterate trough that collection and update all of them, which takes time (a lot of it). Because of that the entire server will start lagging, which is bad.
So.. here is an Idea:
Use a column system, but with a few differences from the one we have right now.
To iterate trough a column of chunks, you can simply take the column and go trough all the chunks, loading them on your way down/up if you need to, also simply reading a 'empty'-flag and skipping the chunk if it is empty. If you need to do sky-lighting updates, you will have to go trough the column of chunks from top to bottom as always, but if you hit a chunk that is empty, and all its neighbours are empty too, you skip it, and go to the next one, but mark the chunk with a 'Dirty Skylight'-flag. If a player now places a block in/around that one chunk, the lighting information will be calculated given the chunks above (around?) this one, and we really calculate only this one and the other 'Dirty Skylight'-chunks around the changed block. What do we get? We get a hell of a performance boost, since we no longer have to go trough every single block while going from 100K above the ground down to the ground.
Only thing I have not figured out yet: What to do with the shadows? They have to be calculated too somehow.
The next-best solution I can think of:
Use some kind of 'bitmap' to determine what skylight-level should be calculated downwards, updating this bitmap while iterating down if we hit transparent/opaque blocks, practically using it as some kind of 'fill mask' for sky-lighting.
Woah... Wall-Of-Text.
Tell me what you think!
Have a nice day!
- Longor1996
Im a modder/programmer! I am on Twitter and YouTube, and some more I won't tell you about!
Nah, just messin' with you.
This is actually remarkably similar to what CptSpaceToaster was discussing a few pages back on how to fix the lightmap issue, as well as what someone else posted during his involvement in figuring out some of the other problems. So it seems like this is the go-to for the lighting issue.
Now then, as to the chunk column idea, this is essentially what Minecraft already does, in a sense, just more efficient. It seems like it could be the infant stage of the cubic chunks mod being implemented.
This would in fact create a 'Doughnut'-World.
Just try to imagine how it would look like if you took a sheet of paper and formed it so the opposite edges are connected.
The only way to do it, without cutting the paper and pretending you could stretch the paper in any way you want, is to make it into a 'Doughnut'.
As aaronfranke said:
It's impossible to make a sphere out of cubes.
(Maybe in a few dozen years!)
Minecraft is based solely on Java for code, Json for meta-data, and several binary formats for different information storage use-cases (NBT, PNG, OGG).
I know all of them, expect OGG (Sounds/Music).
Mind that there is no way to completely know 'Java', as the language and its standard-library combined are too much to understand.
I think I will try to implement the thing I talked about in my last post in my (private/in-dev) voxel-engine. Should be easy enough without breaking everything.
Have a nice day.
- Longor1996
Im a modder/programmer! I am on Twitter and YouTube, and some more I won't tell you about!
Well, if we had an infinite number of cubes, each individual cube would be (1/infinity) of the total volume that all the cubes took up. Any number divided by infinity (besides zero (infinity is a concept, not a number, but is also an exception to this rule)) is zero, so each cube now has zero volume on the scale we assume we are now working (infinite). If each cube has zero volume, it is a single point, and an infinite number of points can be used to make a sphere, so if we had an infinite number of cubes, we could make a true sphere in Minecraft.
You could have the sun move across the world horizontally in the -Z direction (aka going West) but render it differently based on a player's distance from the sun. So that when a player is nearest to the sun, it renders at it's highest point and as the player travels further away it renders lower in the sky, just as if the player is transitioning timezones on a round world. Likewise with the moon as it's opposite the sun in it's rotation. The speed of the sun's perpetual westward journey as well as how quickly it rises/falls would scale with the size of the world.
This is going off topic though.
Edit: Heck if you include the distance in the Z direction in the the sun height/moon height rendering so long as you take the absolute value of the player's z position. In other words to a player standing at the most extreme Z value (i.e. the "poles") half of each the sun and moon would be visible on the edge of the horizon and would appear to rotate around the player if he were to wait around and watch them move.
Ah, no wait, they wouldn't look like that at all! Instead either the sun or the moon would appear twice on both sides of the horizon traveling steadily east... dip below the horizon and trade places with the moon depending on time of day... I think. I'm having trouble imagining it.
What I'm saying is that on an infinitely large scale, each cube would be infinitely small, as it has a finite volume (1kL), and that if you had an infinitely large area with infinitely many cubes, you could eventually (on an infinitely large scale) make a sphere, which would have no curvature (unless viewed on an infinitely large scale). But yea, there is absolutely no point in making a sphere.
INFINITE BUILDING!
As it will be in the future, it was at the birth of Man
There are only four things certain since Social Progress began.
That the Dog returns to his Vomit and the Sow returns to her Mire,
And the burnt Fool's bandaged finger goes wabbling back to the Fire;
And that after this is accomplished, and the brave new world begins
When all men are paid for existing and no man must pay for his sins,
As surely as Water will wet us, as surely as Fire will burn,
The Gods of the Copybook Headings with terror and slaughter return!
-The Gods Of The Copybook Headings, by Rudyard Kipling.
I saw that too. It feels almost like they're taking some of the ideas from this, but are waiting for a solution to the lighting issue before they put the real CC part in.
I agree.
As it will be in the future, it was at the birth of Man
There are only four things certain since Social Progress began.
That the Dog returns to his Vomit and the Sow returns to her Mire,
And the burnt Fool's bandaged finger goes wabbling back to the Fire;
And that after this is accomplished, and the brave new world begins
When all men are paid for existing and no man must pay for his sins,
As surely as Water will wet us, as surely as Fire will burn,
The Gods of the Copybook Headings with terror and slaughter return!
-The Gods Of The Copybook Headings, by Rudyard Kipling.