TheOpenSpaceProgram / new-ospgl

A space exploration game in OpenGL. Devblog: https://tatjam.github.io/index.html
MIT License
41 stars 6 forks source link

In-game lua computer #49

Open tatjam opened 1 year ago

tatjam commented 1 year ago

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.

tatjam commented 1 year ago

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.

tigercoding56 commented 3 weeks ago

can we make it have the texture of the minetest mesecons mod lua controller ? (if licensing allows since i am not a lawyer ) https://github.com/minetest-mods/mesecons image also check out https://github.com/joe7575/safer_lua/tree/master for simple lua sandbox (idk if that is what you are looking for maybe it is a bit too simple )