Webassembly instead of/alongside lua?
Posted: Sun Jul 23, 2023 7:46 pm
Hi
So just wondering, how complicated would be to add support for webassembly mods alongside lua mods?
If this is too much for this game, would you consider something as webassembly instead of lua, in a future game similar to factorio (if you'd make one?)
Lua is nice for having sandboxed environment, and is also simple to interact with from application side. However it is terribly slow, and inefficient for games such as Factorio, and hinders development of mods that are performance heavy. For example making a combinator controlling assembler recipes based on circuit network signals, would hog down performance quite a lot, if you have 10-20 such combinators in a game.
Webassembly for example, is a virtual machine, and therefore offers sandboxing capabilities, plus it has implementations that are lot faster than lua (wasm3 for example). It also has a benefit of choosing what language to use for making your mod, and therefore you could choose a language that has best features for your particular case (such as value types), and from the looks of one implementation of it (wasm3) it is also simple in api from application point of view.
So just wondering, how complicated would be to add support for webassembly mods alongside lua mods?
If this is too much for this game, would you consider something as webassembly instead of lua, in a future game similar to factorio (if you'd make one?)
Lua is nice for having sandboxed environment, and is also simple to interact with from application side. However it is terribly slow, and inefficient for games such as Factorio, and hinders development of mods that are performance heavy. For example making a combinator controlling assembler recipes based on circuit network signals, would hog down performance quite a lot, if you have 10-20 such combinators in a game.
Webassembly for example, is a virtual machine, and therefore offers sandboxing capabilities, plus it has implementations that are lot faster than lua (wasm3 for example). It also has a benefit of choosing what language to use for making your mod, and therefore you could choose a language that has best features for your particular case (such as value types), and from the looks of one implementation of it (wasm3) it is also simple in api from application point of view.