←back to thread

218 points generichuman | 1 comments | | HN request time: 0s | source
Show context
samiv ◴[] No.44007009[source]
After having embedded Lua in my game engine and having worked with some Lua games I've come to conclusion that:

- Lua is great from the integrator/engine dev perspective. It's easy to embed and there are several libraries that help with creating bindings between Lua and your game classes.

- Lua has absolutely terrible runtime performance especially when the GC stalls. You soon learn that you have to start moving code to the native side and carefully consider the APIs that you provide for the game so that you can even dream of any type of performance. Haven't tried LuaJIT since that doesn't work with WASM so it's not an option for me.

- The loose runtime typing in Lua is absolutely terrible, and while it's easy and fast to knock up some simple script you really pay the price when you try to maintain or refactor your code and you have no typing information. For the game engine developer this also makes it very hard to provide any kind of help for the game developer, i.e. "intellisense" kind of functionality. I've basically "solved" this by assuming that variables have certain name suffixes and prefixes and when those are present I assume that it has a certain type which lets me provide a list of functions in the script editor to the game developer. Far from perfect. [see link below]

https://github.com/ensisoft/detonator/blob/master/screens/ed...

replies(4): >>44007470 #>>44007936 #>>44008519 #>>44010512 #
1. spookie ◴[] No.44007470[source]
Any alternatives you've tried that are better in those areas?