MCPSERV.CLUB
Luanti

Luanti

Self-Hosted

Open‑source voxel engine for building, exploring, and modding

Active(100)
12.0kstars
0views
Updated 5 days ago

Overview

Discover what makes Luanti powerful

Luanti (formerly Minetest) is a cross‑platform, open‑source voxel engine written primarily in C++ with a Lua scripting layer. It exposes a full game loop, physics, rendering, and networking stack while delegating gameplay logic to Lua scripts. This separation lets developers prototype quickly in Lua and then ship high‑performance binaries for Windows, macOS, Linux, BSDs, and Android.

Core engine

Scripting

Data storage

Networking

Overview

Luanti (formerly Minetest) is a cross‑platform, open‑source voxel engine written primarily in C++ with a Lua scripting layer. It exposes a full game loop, physics, rendering, and networking stack while delegating gameplay logic to Lua scripts. This separation lets developers prototype quickly in Lua and then ship high‑performance binaries for Windows, macOS, Linux, BSDs, and Android.

Technical Stack & Architecture

  • Core engine: C++17, SDL2 for input/windowing, OpenGL/DirectX 11+ for rendering. The engine is modular: core services (audio, physics, networking) are compiled into a shared library (libluanti.so/luanti.dll) that the launcher loads.
  • Scripting: Lua 5.4 is embedded via luabind‑style bindings. All game content—nodes, items, entities, chat commands—is defined in Lua tables exposed through the minetest global namespace.
  • Data storage: Worlds are stored in a custom binary format (.mtd files) that serialize chunk data, entity state, and metadata. Optional SQLite back‑ends are available for server side persistence (player inventories, bans).
  • Networking: A lightweight TCP/UDP protocol handles player connections, entity replication, and chat. The engine ships a built‑in server that can host up to several hundred players on commodity hardware.

Core Capabilities & APIs

  • Lua API: minetest.register_node, register_item, register_entity, register_chatcommand, etc. These functions allow developers to add new block types, tools, and gameplay mechanics without touching C++ code.
  • Mod lifecycle hooks: on_prejoin, after_mods_loaded, before_shutdown provide deterministic points for initialization and cleanup.
  • Map generators: Built‑in generators (flat, perlin, caves) can be swapped or extended via Lua modules. Custom generators can directly manipulate chunk data.
  • ContentDB integration: The engine can download mods and texture packs from the community repository via HTTP, enabling rapid iteration.

Deployment & Infrastructure

  • Self‑hosting: The server binary is a single executable with optional command‑line flags for port, max players, and world directory. It can be run on bare metal or within a Docker container (luanti/luanti:latest).
  • Containerization: Official Docker images expose volume mounts for /worlds, /mods, and /contentdb. Environment variables (MAX_PLAYERS, SERVER_NAME) configure runtime behavior.
  • Scalability: While a single server handles hundreds of players, horizontal scaling is achievable via dedicated proxy layers (e.g., HAProxy) that route clients to multiple instances and share world state through a central database.

Integration & Extensibility

  • Plugin system: Mods are simply Lua files placed in the mods/ directory. The engine automatically loads them on startup, supporting hot‑reloading in single‑player mode.
  • Webhooks & REST: A minimal HTTP server can be enabled to expose endpoints for player statistics or custom chat commands. Third‑party services (Discord bots, monitoring dashboards) can hook into these endpoints.
  • Customization: Texture packs are ZIP archives that override node textures at runtime. Shader overrides allow developers to experiment with visual styles without recompiling the engine.

Developer Experience

  • Documentation: The doc/developing/ directory contains a comprehensive Lua API reference, architecture diagrams, and best‑practice guides. The website hosts tutorials from beginner to advanced.
  • Community: A vibrant forum and IRC channel provide rapid support. The ContentDB API is well‑documented, enabling automated publishing of mods.
  • Licensing: LGPLv2.1+ allows commercial use while requiring modifications to the engine to be shared, striking a balance between openness and proprietary development.

Use Cases

  1. Custom multiplayer server – Deploy a themed voxel world (e.g., survival, creative) with bespoke gameplay rules via Lua scripts.
  2. Educational sandbox – Build physics or programming lessons by exposing low‑level engine functions to students in a safe environment.
  3. Rapid prototyping – Iterate on game mechanics entirely in Lua, then compile a lightweight binary for distribution.
  4. Modding platform – Host a mod showcase where community members can drop new content into the server’s mods/ folder and see it applied instantly.

Advantages Over Alternatives

  • Performance: Native C++ engine with optional OpenGL/DirectX rendering delivers frame rates comparable to commercial voxel engines.
  • Modularity: Lua scripting keeps gameplay logic separate, enabling quick iteration without recompilation.
  • Open‑source licensing: LGPLv2.1+ allows commercial deployment while preserving community contributions.
  • Cross‑platform reach: Native binaries for major desktop OSes and Android reduce friction for developers targeting diverse audiences.
  • Extensive mod ecosystem: Over 1,100 mods on ContentDB provide ready‑made building blocks and learning material.

Luanti’s architecture empowers developers to focus on creative game design while leveraging a robust, self‑hosted engine that scales from single‑player prototypes to large multiplayer communities.

Open SourceReady to get started?

Join the community and start self-hosting Luanti today

Weekly Views

Loading...
Support Us

Featured Project

$30/month

Get maximum visibility with featured placement and special badges

Repository Health

Loading health data...

Information

Category
other
License
NOASSERTION
Stars
12.0k
Technical Specs
Pricing
Open Source
Database
None
Docker
Community
Supported OS
WindowsmacOSLinuxBSDAndroidDocker
Author
luanti-org
luanti-org
Last Updated
5 days ago