AbyssEngineOld icon indicating copy to clipboard operation
AbyssEngineOld copied to clipboard

Switch to Lua 5.1 / LuaJIT

Open DarthGandalf opened this issue 3 years ago • 10 comments

LuaJIT implementation is faster than Lua, but it's compatible with Lua 5.1 with some extensions from 5.2 instead of Lua 5.4

C++ API should be mostly the same, but some lua code in OD2 may need to be updated

DarthGandalf avatar Feb 02 '22 16:02 DarthGandalf

If you do that I would want bitwise operator functions for numbers. Im about to start storing colors as a single number again in lua

cookta2012 avatar Feb 10 '22 00:02 cookta2012

@cookta2012 is that different between lua versions?

DarthGandalf avatar Feb 10 '22 00:02 DarthGandalf

Primarily that and other things but that's one of the few things I was getting ready to use. I mean if it comes to it I know in c++, a couple of bitwise shift left and right operators can be created easily.

cookta2012 avatar Feb 10 '22 00:02 cookta2012

Sorry, let's do a step back. What does bitwise operator have to do with lua version? I'm not asking you to switch from lua to c++

DarthGandalf avatar Feb 10 '22 00:02 DarthGandalf

No what I'm referring to is in Lua I don't remember exactly what version but 5.1 does not have bitwise operators. I was actually getting ready to commit here in the next day or two some code restructuring the way colors are stored. As well as use it for a couple other things. What I'm saying is if we do go to 5.1 a helper function would need to be created in c++ to allow me to use a bitwise operator in Lua something like rshift(val,places)

cookta2012 avatar Feb 10 '22 00:02 cookta2012

So that the Lua instead of having memory there's only one mainly memory saving

cookta2012 avatar Feb 10 '22 00:02 cookta2012

It's something minor I just wanted to bring it up that's all

cookta2012 avatar Feb 10 '22 00:02 cookta2012

I see

DarthGandalf avatar Feb 10 '22 00:02 DarthGandalf

I just wanted to let you know

cookta2012 avatar Feb 10 '22 00:02 cookta2012

Further investigation it seems like they have everything I would need anyway I would say go ahead

cookta2012 avatar Aug 18 '22 16:08 cookta2012