hank you! That separation was a very deliberate choice I've seen firsthand how quickly things degrade when packet handling leaks into game logic.
You're touching on a real pain point. Right now the Lua boundary does show measurable overhead under load, especially with per-tick callbacks across many entities (doors, spawners, etc.). MoonSharp's interop
cost adds up when you're calling into Lua thousands of times per tick.
I'm actively looking at batching script invocations per tick and capping the budget so a heavy script wave can't blow up tail latency. The goal is to keep the game loop deterministic if Lua eats too much of the tick budget, defer the rest to the next tick rather than letting the whole loop stall.
It's one of those problems where the architecture gives you a clean place to solve it (the boundary is explicit, so you can meter it), but the solution still needs work. Appreciate you calling it out — good toknow others think about the same tradeoffs.
hank you! That separation was a very deliberate choice I've seen firsthand how quickly things degrade when packet handling leaks into game logic.
You're touching on a real pain point. Right now the Lua boundary does show measurable overhead under load, especially with per-tick callbacks across many entities (doors, spawners, etc.). MoonSharp's interop cost adds up when you're calling into Lua thousands of times per tick.
I'm actively looking at batching script invocations per tick and capping the budget so a heavy script wave can't blow up tail latency. The goal is to keep the game loop deterministic if Lua eats too much of the tick budget, defer the rest to the next tick rather than letting the whole loop stall.
It's one of those problems where the architecture gives you a clean place to solve it (the boundary is explicit, so you can meter it), but the solution still needs work. Appreciate you calling it out — good toknow others think about the same tradeoffs.
Luanti(previously Minetest) does a similar trick: c++ core/game engine, but all the game logic is in lua.