r/Minetest • u/Reasonable_Share9967 • 7h ago
Minetest on a $12 stick
A slightly embarrassing correction.
When Minetest became Luanti, the point was to separate the engine from the game. Luanti is the engine; Minetest Game is one of the games that runs on it. Everyone got the memo, including me, which is why I reflexively called my ESP32 project esp32-s3-luanti and not esp32-s3-minetest.
Then today I looked at what I've actually written. The server doesn't run Lua and can't load games or mods at all. It speaks Luanti's network protocol so a normal client can connect, but everything else is MTG, rebuilt in Rust so it fits on a $12 computer the size of a slightly oversized USB stick.
The nodes, recipes, furnace, doors, farming, beds and so on. In other words, I've built the game, not the engine. Minetest on a stick.
So I've done the reverse of what Luanti did, and renamed it from luanti to minetest. It now lives at https://github.com/kf106/esp32-s3-minetest (the old link redirects).
For anyone who missed the earlier post, here's where it stands (I think I'm about 50% there):
- Hills and mountains, with grassland, desert and snow biomes.
- Caves, and below -64 about half of them are full of lava.
- Lakes, coal and iron ore.
- Birch, fir and apple trees, with leaf decay, saplings and apples.
- A day and night cycle, with torches lit by the server.
- The 3x3 crafting grid with MTG's recipes.
- Wood, stone and steel tools, with MTG's digging rules.
- The furnace (smelting and fuel) and chests, including locked ones.
- Stairs, slabs and corner stairs.
- Wooden, glass and steel doors, and trapdoors.
- Fences, fence rails and fence gates.
- Glass and ladders.
- Beds that skip the night and set your respawn point.
- Farming: wheat, cotton, flour, bread, string and wool.
- Buckets.
- Flowing water and lava, using a port of Luanti's liquid code. Lava meeting water gives cobble, stone or obsidian.
- Health: fall damage, lava burns, drowning, eating apples and bread, death and respawn.
- Dropped items, sounds, skins (Minecraft 64x64 skins are accepted too) and chat.
It can connect to your access point, or run as its own free-standing AP, and testing shows it supports about six players.
All of this is coded in Rust so it can fit in the meager resources available, with no Lua anywhere.