AbyssEngine / AbyssEngineOld

The Open Source ARPG Engine.
https://www.abyssengine.com
GNU General Public License v3.0
438 stars 46 forks source link

Switch to Lua 5.1 / LuaJIT #115

Closed DarthGandalf closed 2 years ago

DarthGandalf commented 2 years ago

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

cookta2012 commented 2 years ago

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

DarthGandalf commented 2 years ago

@cookta2012 is that different between lua versions?

cookta2012 commented 2 years ago

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.

DarthGandalf commented 2 years ago

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++

cookta2012 commented 2 years ago

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 commented 2 years ago

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

cookta2012 commented 2 years ago

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

DarthGandalf commented 2 years ago

I see

cookta2012 commented 2 years ago

I just wanted to let you know

cookta2012 commented 2 years ago

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