Closed bddap closed 4 years ago
Thanks for the suggestion, but I think I'm relatively happy with the solution I have.
I already have Lua/LuaJIT that does a great job for supporting most of the requirements of mod development. The issue I faced was performance when doing things that required a lot of updating of little bits of data, in particular terrain generation and the particle system. The issue was that the interface that I had between Lua and C++ was slowing things down.
I could probably have solved this by actually moving more of the data and code to LuaJIT/FFI, which would have reduced a lot of the performance bottlenecks, but I decided instead to make it as fast and simple as I reasonably could, by implementing the C plugin system for those things that just have to be as fast as possible.
So I don't see how wasm fits in this scenario, and I'm already far too deep. It would be quite a bit of work to now investigate, learn, and implement a new language/system, and really doesn't seem like a good idea for the project at this point.
I'll keep it in mind for future projects though.
Hey dave. Have you considered embedding a webassembly runtime and compiling mods to wasm?