## Lua encoding

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Coder567
Prole
Posts: 42
Joined: Sun Apr 07, 2019 12:32 pm

### Re: Lua encoding

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

Coder567
Prole
Posts: 42
Joined: Sun Apr 07, 2019 12:32 pm

### Re: Lua encoding

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



Nelvin
Party member
Posts: 115
Joined: Mon Sep 12, 2016 7:52 am
Location: Germany

### Re: Lua encoding

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?

Coder567
Prole
Posts: 42
Joined: Sun Apr 07, 2019 12:32 pm

### Re: Lua encoding

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

### Who is online

Users browsing this forum: icekiller8002 and 35 guests