Unfortunate missed opportunity to build on top of Minetest (an amazing open source clone of minecraft that works really well) instead of re-implementing the hard parts yourself (unless that was part of the fun, which I totally understand!).
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!
Ah my mistake, I made a bad assumption based on the pictures (I couldn't read the language and Google translate wouldn't work for some reason, probably because of stuff I do with uMatrix).
That said, still would have loved to see them use Mintest instead as a platform :-)
I had never heard of Minetest before. Have you written up any of your experiences "writing a game" as you say? I'm looking over it and having a hard time thinking about the best way to dip my toes into it.
I have not written anything up about it yetas I'm still in very early stages. I've never used Lua before so am learning that as well (tho having used Ruby/Python/JS extensively it's amazing how readable Lua is, just need to learn the APIs).
If I get anything working tho, I'll put together a write-up to go along with the code :-)
Wow, Minetest looks really cool: Minecraft clone with a Lua API for modding. This may get us back into using Minecraft modding as a way to learn programming.
EDIT: Oh, it's a game engine. Is there a basic 'vanilla' Minecraft clone based on Minetest, for this purpose?
> 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 is also a basic vanilla Minecraft clone (the wording is kind of poor). If you install it you can play a basic game.
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).
One side project that's on my bucket list is to implement very far range of view on Minecraft-like games (e.g. Minetest[1] and Terasology[2]). Something like what we see in Battle Royale games or open-world shooters like Farcry. It's a little frustrating to have such beautiful worlds in these games and not being able to see a large part of it in a stunning landscape.
I have no ideas what kind of techniques would be required. I'm not a computer graphics guy :)
I've had this exact same project idea on my mind for a year or so, largely driven by a desire to see beautiful, to-scale mountain ranges in game (Thousands of blocks of render distance rather than a measly ~256). I wouldn't consider myself a computer graphics guy either; however, I recently started to dive into the world of computer graphics to at least figure out what it would take to implement something like this.
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.
I set up a Minecraft server for some friends a few weeks ago, and I learned firsthand how huge of a performance improvement one can get by dropping the render distance.
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.
I know nothing about the codebase and haven’t done any projects related to game engines/physics rendering, but I’ve seen a lot of games that seem to have “high level” and “low level” simulations. I’ve walked too far too quickly on older systems in open world games and have often noticed lower resolution models that are designed to be seen from far away.
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?
What you are thinking of is called Level of Detail (LOD). The principle being that 3D models further away can be rendered with fewer vertices/polygons, i.e., at a lower LOD. 3D models in Minecraft are almost all simple cubes or a collection of rectangles (e.g., torches, levers, slabs). There aren't really any extra polygons in these models that can be removed to create a less detailed representation, unlike, say in this [1] model of a rabbit.
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].
I thought you might render a snapshot of each few chunks from maybe 16 angles and compose them together like backdrop pieces on a stage. Update the snapshot every time a player moves over that chunk. Just patch into the render function: are we within the (basegame settings) chunk draw distance? (yes) - render the chunk - (no) - retrieve the "backdrop piece" for that chunk from this view angle, and draw it behind everything else rendered so far.
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.
But you've still got to load the chunks from some massive dataset stored somewhere and you can still look/run around in a full sphere at 60fps?
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.
I thought about something like this as well. You could use "low resolution ray-tracing", i.e. using very thick light rays to create layers of 2D snapshots of what's suppose to be beyond the range of view. And then evolve the system from there :)
I'm just starting to learn computer graphics and I've come across the Marching Cubes algorithm; however, I don't understand in this instance what you mean by "using one or more rays per pixel" and how that fits in with Marching Cubes. Could you point me in a direction to learn more about this? Thank you.
Yes sorry that last paragraph is a bit of a munge it should read:
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.
I'm guessing you can get pretty far by compiling the chunks into meshes at multiple levels of detail (2x2, 4x4, 8x8, etc.), each with the same (or similar) number of vertices.
The proof of the characterisation of Eulerian graphs is really neat and one of my favourites. It basically just starts with "choose a maximal trail" and the rest writes itself if you think about it long enough.
A quick search shows MathCraft Security Technologies [1] and MathCraft(TM): Math In Action [2] by Cycorp both exist.
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."
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!
[1]: https://dev.minetest.net/Modding_Overview