← Back to context

Comment by Rohansi

3 hours ago

The underlying voxel game engine is written in C++.

https://github.com/luanti-org/luanti

Yes, the engine handles shaders, networking, DBMS backends (Sqlite, Postgres,... to store "worlds"), entities (mobs/items/vehicles...) to name the obvious things, but the logic of the game (weather, mob AI, user/world interaction, inventories, forms and other dialog box, custom world generation) and other other functions (area protections in multiplayer, account management, chat moderation, ...) are done with Lua 5.1 JIT generally.

The API also gives access to things like image saturation, light intensity, strength of volumetric lighting/bloom/exposure, fog distance, so you can enhance weather effects by altering them - per player; OTOH, rain/snow has to be done with particle spawners by weather mods, and figuring out if the player is inside a building, under cover, or outside in the open is difficult.

One can also hook it with external services, e.g. instant messaging.

[1] https://content.luanti.org/packages/?type=mod&page=1&tag=com... (couldn't find a more accurate category in ContentDB; it's "complex" because downloading and installing a mod or a game with Luanti is a couple of clicks).

  • I didn't mean to make it seem small. I interpreted the comment as being surprised that it is written in a scripting language but Lua is no slouch, especially when the most performance sensitive code is C++. It's a very common pattern in games to boost iteration times - even the Unity engine does something similar.