Page 3 of 5
Re: A community problem in source code protection
Posted: Fri Dec 26, 2014 2:21 am
by ejmr
Azhukar wrote:ejmr wrote:LÖVE is for open-source projects only.
But it's not.
We certainly act like it is though.
I’m sorry, I should have made more context more clear. I was not saying LÖVE is only for open-source projects. I was trying to say we should accept the fact we treat it as if that were the case and just admit it. If the front page of the site said something like, “you can only make open-source games with LÖVE,” then threads like this wouldn’t happpen.
Re: A community problem in source code protection
Posted: Fri Dec 26, 2014 2:23 am
by adnzzzzZ
Did you forget what you wrote as the first post? You can't call out people for what you disagree with in your first post and simultaneously not make it about that.
I've edited the opening post as well as this thread's title.
Re: Source code protection
Posted: Fri Dec 26, 2014 2:24 am
by Azhukar
adnzzzzZ wrote:.gif
I believe you compiled the main.lua into a "main" file without ".lua" and tried to run it as a .love, framework looks for main.lua not main.
adnzzzzZ wrote:I've edited the opening post as well as this thread's title.
About 2 pages too late now.
Re: Source code protection
Posted: Fri Dec 26, 2014 2:25 am
by adnzzzzZ
Azhukar wrote:adnzzzzZ wrote:.gif
I believe you compiled the main.lua into a "main" file without ".lua" and tried to run it as a .love, framework looks for main.lua not main.
adnzzzzZ wrote:I've edited the opening post as well as this thread's title.
About 2 pages too late now.
This worked! Thanks.
Re: A community problem in source code protection
Posted: Fri Dec 26, 2014 2:28 am
by Azhukar
ejmr wrote:LÖVE is for open-source projects only.
ejmr wrote:I was not saying LÖVE is only for open-source projects.
I'm not familiar with the concept of writing something yet not writing it at the same time.
ejmr wrote:I was trying to say we should accept the fact we treat it as if that were the case and just admit it.
There is no 'we', there are many extremely different individuals using this framework.
ejmr wrote:“you can only make open-source games with LÖVE”
This statement is also incorrect. I would point you to the license.txt file included with the love download, I'm sure you can find it.
Re: Source code protection
Posted: Fri Dec 26, 2014 2:36 am
by adnzzzzZ
Alright, so after doing the luajit thing I got a luajit decompiler and tried it out.
This is the original file:
Code: Select all
function love.load()
love.graphics.setBackgroundColor(222, 222, 222)
end
function love.update(dt)
end
function love.draw()
end
This is the code generated by this
https://github.com/bobsayshilol/luajit-decomp/wiki decompiler (it was the first one I found on Google):
Code: Select all
function someFunc0()
love.graphics.setBackgroundColor( 222 , 222 , 222 )
return
end
function someFunc1()
return
end
function someFunc2()
return
end
function someFunc3()
local randomFunction0 = function() end -- starts at test.lua:0
love.load = randomFunction0
local randomFunction1 = function() end -- starts at test.lua:0
love.update = randomFunction1
local randomFunction2 = function() end -- starts at test.lua:0
love.draw = randomFunction2
return
end
I have some new questions:
1) This pretty much offers no protection as far as I'm concerned. Is the luajit method the only and best one available?
2) Assuming the answer to 1 is true, what are other techniques that can be used to make the steps to achieving a file like the one that that decompiler used harder? Now, I imagine that at this point describing things in terms of steps isn't possible anymore, so I'm happy with high level descriptions of the various techniques used.
Re: A community problem in source code protection
Posted: Fri Dec 26, 2014 2:38 am
by slime
ejmr wrote:If the front page of the site said something like, “you can only make open-source games with LÖVE,” then threads like this wouldn’t happpen.
The front page says this:
You can use it freely for commercial purposes with no limitations.
The culture on the forums definitely gravitates towards open-source love projects, but I don't want that to discourage closed-source projects from being created – they're certainly allowed!
Re: A community problem in source code protection
Posted: Fri Dec 26, 2014 2:57 am
by ejmr
Azhukar wrote:ejmr wrote:LÖVE is for open-source projects only.
ejmr wrote:I was not saying LÖVE is only for open-source projects.
I'm not familiar with the concept of writing something yet not writing it at the same time.
Please stop omitting the important context of my first quote. I said this:
ejmr wrote:…I am in favor of kikito’s idea of making it clear that LÖVE is for open-source projects only.
The other quotes of mine you reference have the same problem.
Re: Source code protection
Posted: Fri Dec 26, 2014 3:07 am
by slime
kikito wrote:I propose that we put the following on front page: LÖVE is built to make open-source games. If you want to make closed-source games, you might want to look elsewhere. If more "how to make closed-source LÖVE game" forum posts appear, we just point them to the front page. That would solve the issues these people have.
LÖVE is built to make both open-source and closed-source games. Putting that on the front page would be really misleading! It is true that it's easier to make a closed-but-easily-viewable-source game than a closed-and-hidden-source game using LÖVE though.
If you think the front page needs more clarification though, we could change it to explicitly say that closed-source games using LÖVE are possible and welcome. We could also add more instructions on the wiki for best practices for better hiding the source of your games.
Re: Source code protection
Posted: Fri Dec 26, 2014 4:23 am
by szensk
adnzzzzZ wrote:Alright, so after doing the luajit thing I got a luajit decompiler and tried it out.
I have some new questions:
1) This pretty much offers no protection as far as I'm concerned. Is the luajit method the only and best one available?
2) Assuming the answer to 1 is true, what are other techniques that can be used to make the steps to achieving a file like the one that that decompiler used harder? Now, I imagine that at this point describing things in terms of steps isn't possible anymore, so I'm happy with high level descriptions of the various techniques used.
For more complicated code it does a better job of obfuscating what is being done. Give the decompiler a more realistic example.
For example, this is the decompiled bytecode for a very simple example:
Code: Select all
function someFunc0()
assert(1, "always true")
return
end
function someFunc1(INPUT_VAR_0_)
local var_1_1 = love.mouse.getY()
if 65 <= var_1_1 then
--jump to 0032 (if previous if statement is false)
var_1_1 = love.mouse.getY()
if var_1_1 <= 98 then
--jump to 0032 (if previous if statement is false)
INPUT_VAR_0_ = 1
var_1_1 = love.mouse.isDown("l")
if var_1_1 then
--jump to 0032 (if previous if statement is false)
if uget_1_1 == true then
--jump to 0032 (if previous if statement is false)
USETP unhandled at 0026
var_1_1 = 2
uget_1_3( 2 )
INPUT_VAR_0_ = 1
--location 0032
return
end
function someFunc2()
local var_2_0 = true --var_2_0 PRIMITIVE-PRIMITIVE
local var_2_1 = nil --var_2_1 PRIMITIVE-PRIMITIVE
local var_2_2 = 0 --var_2_2 NUMBER-NUMBER
local randomFunction0 = function() end -- starts at test.lua:0
local randomFunction1 = function() end -- starts at test.lua:0
love.update = randomFunction1
return
end
At this point, people messing with the game will actually have to be persistent.