from Hacker News

Minetest – A free, open-source voxel game engine and game

by mynameislegion on 10/9/16, 8:26 AM with 54 comments

  • by dcposch on 10/9/16, 10:13 AM

    This is pretty cool. Props for doing a massive amount of work and creating something open and extensible.

    --

    I just tried reading the code to learn how MineTest does voxel meshing, and it didn't go so well.

    (Voxel meshing is about turning blocks into triangles efficiently, and it's surprisingly tricky. Mikola Lysenko wrote a great exposition of the problem and several solutions way back in 2012: https://0fps.net/2012/06/30/meshing-in-a-minecraft-game/ )

    I was curious which approach MineTest chose, and I still don't know. I think I found the files where the meshing happens, mapblock_mesh.h/cpp. The code quality is... less than perfect.

    There are 200+ line C++ functions. There's commented out code and preprocessor "#if 0" ignored code.

    There's a struct that looks important, but it's called "MeshMakeData", and I don't know what it represents. The comment above just says "Mesh making stuff":

    https://github.com/minetest/minetest/blob/0a16e53b40d347db7d...

    The file that seems to run everything, game.cpp, is almost 5000 lines long.

    --

    For an example of really clean game code, check out Quake or Doom 3. Both have:

    * short and sweet main() methods

    * comments that guide the reader and explain what does what

    * clean decomposition

    * short, readable functions, and...

    * reasonably small files

    So far, MineTest, at least in part, took the "big hairy ball of C++" approach.

    Good luck with future development!

  • by TamHagmas on 10/9/16, 6:38 PM

    A minetest developer just recently published a sphere-shaped planet version of minetest:

    https://forum.minetest.net/viewtopic.php?f=14&t=15643

    https://www.youtube.com/watch?v=ztAg643gJBA

    https://www.youtube.com/watch?v=joFWr3JzBOI

    That's just the thing I love about these smaller voxel games - they may not have a huge userbase, but there is innovation happening.

  • by giancarlostoro on 10/9/16, 9:02 AM

    It's worth noting that Minetest is available on Ubuntu (and possibly Debian?) via apt (apt-get). Not sure how dated it may be, but it's still playable and useful.
  • by qwertyuiop924 on 10/9/16, 9:55 AM

    As a longtime MC user, I have to say this is really cool. OTOH, it doesn't have MC's amazing mod ecosystem, which is a huge part of why that game is so great.
  • by qznc on 10/9/16, 9:29 AM

    I made a few mods a while ago. Pleasurable experience even though I was new to Lua.
  • by smnscu on 10/9/16, 5:28 PM

    One of the best 'downloads' page I've seen

    http://www.minetest.net/downloads/

  • by gravypod on 10/9/16, 2:08 PM

    Unfortunately this doesn't seem to expose nearly enough features to the programmer of mods. No way to do direct rendering of your own, add AIs, or many other much needed things.

    You can basically just define blocks and HUD items and that's it.

    Good work on writing the engine, just needs a little more work on the API side.

  • by ghostDancer on 10/9/16, 11:26 AM

    There's also a fork Voxelands http://www.voxelands.com/about.html