Matheminecraft: Where math and Minecraft meet
phys.org
phys.org
If anyone is thinking about doing something like that, you can develop entire games as "Minetest mods"[1] which would have allowed him to mostly just write "business logic." I've started writing a "game" using that myself.
Nonetheless, great idea and I'm glad to see it happen!
That said, still would have loved to see them use Mintest instead as a platform :-)
If I get anything working tho, I'll put together a write-up to go along with the code :-)
EDIT: Oh, it's a game engine. Is there a basic 'vanilla' Minecraft clone based on Minetest, for this purpose?
Yes, it's the default `minetest_game` that comes with the game (as well as `minimal`). Note that the redstone-alike mesecons is a separate modpack (which isn't a problem in practice) as is mob support (which is).
It's also in the repos of every linux distro I've tried it on (Fedora, Ubuntu, Debian), and if it isn't it builds really easily (even built on my Chromebook with both crouton and crostini).
You can also add "mods" to it that add a ton of rich features to the game. I recommend adding one at a time tho as they can make your server unstable (mods vary in quality). The minetest core is rock solid stable IME, but not all mods are.
If there's any interest, I can write a blog post about this with getting started instructions at playing and configuring. I'm not affiliated with the project, but I'm a big fan and use it at home with my kids (and a server I setup on our LAN).
I have no ideas what kind of techniques would be required. I'm not a computer graphics guy :)
My basic understanding of the problem is that it's less of a graphics problem and more of a CPU one. Loading another chunk requires the game to actively simulate everything happening in that chunk, and, since the game is single-threaded, increasing the number of chunks loaded quickly causes the amount of work needing to be done per tick to explode.
Am I right in thinking that Minecraft doesn’t do that? And that everything rendered uses the same resolution models for things far away as for things close up?
Thus, you are right in thinking that Minecraft doesn't implement a LOD by changing the resolution of the models; however, it does use progressively lower resolution textures for texturing models that are farther away. This is a common technique called mipmapping [2].
[1] - https://cathyatseneca.gitbooks.io/3d-modelling-for-programme... [2] - https://en.wikipedia.org/wiki/Mipmap
Essentially Minecraft is a voxel system which grows at a cubic rate.
This will quickly fill your GPU's memory and shortly there after system memory and shortly after that storage memory.
Rendering it on the other hand would be relatively trivial with a marching cube algorithm using one or more rays per pixel.
You could even add atmospheric effects to cheat and only save a monochrome image, then tint it progressively bluer and bluer (but not invisible) with distance.
The backdrop pieces are effectively where the rays hit as far as I can tell from your description.
One memory optimisation I can think of is to store a bvh of the empty space and traverse that. Using a signed distance field might also help in the ray marching.
Rendering it on the other hand would be relatively trivial with a marching cube algorithm AND using one or more rays per pixel [to ray trace against the hull constructed by the simplified marching cube algo - for DXR]
Having thought about it a bit more since (in the other answers) you may be better off with a signed distance field or constructing a specialised BVH yourself as this is a simplified case.
As a sibling commenter mentioned, using a marching cube algorithm is one approach. 0fps [1] has a good blog post about using Progressively Ordered Primitive buffers to implement Level of Detail in Minecraft-like games. (There is an interesting comment on that blog replying to that post.) Another blog [2] shows a similar implementation in a Minecraft-like game call "SeaOfMemes".
On a side note, I've never heard of Terasology—and it's been around for 9 years(!) it seems. I'll definitely check it out.
[1] - https://0fps.net/2018/03/03/a-level-of-detail-method-for-blo... [2] - http://www.sea-of-memes.com/LetsCode64/LetsCode64.html and http://www.sea-of-memes.com/LetsCode67/LetsCode67.html
On a similar note, I find it amusing that accidentally going to minecraft.com instead of minecraft.net brings you to the home page of a literal mining engineering consultancy [3].
"MineCraft Consulting provides innovative solutions and project management services for coal mining projects in Australia and Overseas."
"MineCraft is a registered trademark of MineCraft Consulting Pty Ltd."
[1] - https://www.mathcraft.com/ [2] - http://mathcraft.ai/ [3] - http://www.minecraft.com/