Page 2 of 2

Re: Lua encoding

Posted: Wed Oct 09, 2019 12:35 pm
by Coder567
zorg wrote: Wed Oct 09, 2019 11:51 am
Coder567 wrote: Wed Oct 09, 2019 11:41 am My projects are always so big I would like to have some protection. Then after some time after the release I could release the code so people can mod it but at start I would like to have the source closed. Or partly open source, for modding.

I tried luajit to compile lua file but love couldn't read the compiled file
I think i mentioned it previously, but you need to use the same version of LuaJIT that the Löve version you have uses.
That must be the issue, I used luaJIT 2.1.0-beta3
I guess love is still using 2.0

Re: Lua encoding

Posted: Wed Oct 09, 2019 4:36 pm
by Coder567
Got the code encoding working now with love. I wonder how well can people actually decode the files because I haven't found any good decoders from google. Found just this one (luajit-decomp) which doesn't do too good job

original source:

Code: Select all

local test = "Test string "

print (test .. 123)

function love.draw()
love.graphics.print("Hello World!", 400, 300)
end
Decoded:

Code: Select all

function someFunc0()
love.graphics.print("Hello World!",  400 ,  300 )
return
end


function someFunc1()
local var_1_2 = "Test string "
var_1_2 = var_1_2 ..  123 
print(var_1_2)
local randomFunction0 = function() end -- starts at  test.lua:0
love.draw = randomFunction0
return
end


Re: Lua encoding

Posted: Thu Oct 10, 2019 5:41 pm
by Nelvin
Coder567 wrote: Wed Oct 09, 2019 11:41 am My projects are always so big I would like to have some protection. Then after some time after the release I could release the code so people can mod it but at start I would like to have the source closed. Or partly open source, for modding.
May I ask to see any of your previous projects just to get a feeling for what you mean with your projects are always so big?

Re: Lua encoding

Posted: Fri Oct 11, 2019 7:40 am
by Coder567
Nelvin wrote: Thu Oct 10, 2019 5:41 pm
Coder567 wrote: Wed Oct 09, 2019 11:41 am My projects are always so big I would like to have some protection. Then after some time after the release I could release the code so people can mod it but at start I would like to have the source closed. Or partly open source, for modding.
May I ask to see any of your previous projects just to get a feeling for what you mean with your projects are always so big?
My previous projects are mostly (the big ones) mods for games. I decided to make game of my own this time
And it's pretty big again :)