You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This needs a way to serialize a running lua state, including local variables and similar. This may not be possible with LuaJIT. In that case, we are left with three alternatives:
Have in-game computers require serialization code, which doesn't make much sense and is bad for players
Implement a lua version that's compatible with this: https://github.com/fnuecke/eris This would mean that computers would truly be isolated from the lua world and would interact with machines and such through APIs. Seems like a good option but may be "bloaty"
Don't have in-game lua computers. This means that any kind of computer would have to be an emulated architecture / interpreted language. Easiest option :P
Mods could later on implement, for example, emulators for other architectures, as this can easily be done in lua (with reasonable performance thanks to LuaJIT) so that's outside the scope of the engine.
The text was updated successfully, but these errors were encountered:
Obviously restoring userdata and such is pretty much imposible, the objective is to save and restore a "virtual lua environment" that's actually quite isolated from the game.
This needs a way to serialize a running lua state, including local variables and similar. This may not be possible with LuaJIT. In that case, we are left with three alternatives:
Mods could later on implement, for example, emulators for other architectures, as this can easily be done in lua (with reasonable performance thanks to LuaJIT) so that's outside the scope of the engine.
The text was updated successfully, but these errors were encountered: