Hacker News new | ask | show | jobs
by Sylos 3121 days ago
I think, that's rather an argument in favor of Minetest.

It's true that Java (which the original and mainly modded version of Minecraft is written in), is widely known and generally allows to write functionality relatively quickly.

Minetest uses C++ for the engine and Lua for its modding API. C++ is much better suited for a game engine, due to being closer to the hardware, using less RAM (due to not being executed in a virtual machine), not having a Garbage Collector, which halts the universe for a short moment every few seconds and is the main-reason for Minecraft still having lag spikes after years of optimizations, and then miscellaneous things like array boundary checks, but also just more game libraries being available in the C++-context (Minetest for example builds on top of Irrlicht).

But Lua for the modding API is the critical part. Minecraft doesn't have a modding API. To this day, you still mod the original Minecraft by decompiling its code (which is relatively easy thanks to Java), making your changes as a professional developer at Mojang would have to make them, and then bundling your modifications up and releasing it to the world.

As a result, it's just really not easy to do at all and mods regularly break when Mojang releases a new version.

With Minetest's modding API on the other hand, it's really easy to just quickly make some changes. I for example always disliked that digging stone gives you cobblestone, which you then have to smelt in order to get stone again. Changing that took me less than 10 minutes with no experience in Minetest modding.

All I had to do, is to find the right file and then in this section:

    minetest.register_node("default:stone", {
	description = "Stone",
	tiles = {"default_stone.png"},
	groups = {cracky = 3, stone = 1},
	drop = 'default:cobble',
	legacy_mineral = true,
	sounds = default.node_sound_stone_defaults(),
    })
...change the Drop from default:cobble to default:stone.

I then also added in a crafting recipe to convert stone to cobblestone, if I ever want to use cobblestone. Again, find the right file and then just add this:

    minetest.register_craft({
	output = 'default:cobble',
	recipe = {
		{'default:stone'},
	}
    })
Just copy-paste an existing crafting rule and change it to your needs. This is something I could have pulled off (and would have had huge fun with) even before I really knew what programming is.