Page 2 of 3

Re: Lua obfuscation

Posted: Mon Oct 11, 2010 5:49 pm
by bartbes
I see love as a viable platform for commercial, closed-source games, we're just doing it the nice way, no aggressive (useless, annoying, etc, etc) DRM, and there is no real need for code hiding either.

Re: Lua obfuscation

Posted: Mon Oct 11, 2010 5:50 pm
by leiradel
vrld wrote:
leiradel wrote:Perhaps I'm part of a very small group of people here that does not look to LÖVE as a toy engine?
Or maybe you are just part of the group that for whatever reasons don't want to create free software.
It's the opposite. But I've never seen a game studio release source code at launch time, though the studio I work for releases pieces and bits as open source.

Re: Lua obfuscation

Posted: Mon Oct 11, 2010 5:52 pm
by leiradel
bartbes wrote:I see love as a viable platform for commercial, closed-source games, we're just doing it the nice way, no aggressive (useless, annoying, etc, etc) DRM, and there is no real need for code hiding either.
I was counting you in the group :ultraglee:. I'm not talking about DRM but code hiding is an issue for me.

Re: Lua obfuscation

Posted: Tue Oct 12, 2010 9:57 am
by zac352
nevon wrote:
Lap wrote:A big lol to all attempts to make Lua close sourced.
Making a lua script closed source is easy. I just did it last night, actually.

Code: Select all

function scareAwayEbilHackers(s)
local r;
for i=1,#s do
r=r.."\\"..string.byte(s,i,i)
end
return r
end
:3

Re: Lua obfuscation

Posted: Tue Oct 12, 2010 9:58 am
by zac352
leiradel wrote:
vrld wrote:
leiradel wrote:Perhaps I'm part of a very small group of people here that does not look to LÖVE as a toy engine?
Or maybe you are just part of the group that for whatever reasons don't want to create free software.
It's the opposite. But I've never seen a game studio release source code at launch time, though the studio I work for releases pieces and bits as open source.
I was reading this thing about how spore's (very glitchy) creature logic is the future of gaming... But do I see a source release anywhere? Lol.

Re: Lua obfuscation

Posted: Tue Oct 12, 2010 6:23 pm
by Robin
zac352 wrote:
nevon wrote:
Lap wrote:A big lol to all attempts to make Lua close sourced.
Making a lua script closed source is easy. I just did it last night, actually.

Code: Select all

function scareAwayEbilHackers(s)
local r;
for i=1,#s do
r=r.."\\"..string.byte(s,i,i)
end
return r
end
:3
Fail. And stop doubleposting.

Re: Lua obfuscation

Posted: Tue Oct 12, 2010 11:37 pm
by Simtex
If you want to obfuscate code that much, just add LUBE to your project and make a thin client distributable for the user then have them contact your server to do the heavy calculations using the code you want to hide.

I think everyone here knows that no widely distributed program can truly obfuscate its underlying operations. So obfuscation or DRM are really a matter of how many hoops you want the hacker to jump through to get what he wants.

The difficulty of obfuscating LOVE code isn't a limitation of LOVE, but a limitation of Lua itself. Lua by its very nature is not useful for creating obfuscated programs. If you really want to protect code that much, you're probably better off using a game engine that uses more traditional compiled languages.

Executable packers, or compiling your own version of LOVE with zip password support are your only real options.

Re: Lua obfuscation

Posted: Wed Oct 13, 2010 9:26 pm
by pygy
???

Why obfuscate your source when you can compile to bytecode?

http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/#luac.lua is a lua compiler that supports require(). Written in pure Lua.

See http://lua-users.org/lists/lua-l/2008-08/msg00092.html for the rudimentary documentation.

Re: Lua obfuscation

Posted: Wed Oct 13, 2010 9:29 pm
by vrld
pygy wrote:Why obfuscate your source when you can compile to bytecode?
That's why

Re: Lua obfuscation

Posted: Wed Oct 13, 2010 9:55 pm
by pygy
What kind of problem could arise?

As long as LÖVE uses vanilla Lua, the corresponding LuaC should do the trick... Regardless of the platform... Or am I missing something?

Of course, if you compile LÖVE with, say, LuaJIT2, it will break.

The main reason to obfuscate code would be for a commercial game, and in this case, you don't distribute a .love archive, but a binary with the .love appended. In this case, you control the version of LÖVE shipped with your game, and the whole toolchain to build it...