Lua obfuscation

General discussion about LÖVE, Lua, game development, puns, and unicorns.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Lua obfuscation

Post 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.
User avatar
leiradel
Party member
Posts: 184
Joined: Thu Mar 11, 2010 3:40 am
Location: Lisbon, Portugal

Re: Lua obfuscation

Post 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.
User avatar
leiradel
Party member
Posts: 184
Joined: Thu Mar 11, 2010 3:40 am
Location: Lisbon, Portugal

Re: Lua obfuscation

Post 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.
User avatar
zac352
Party member
Posts: 496
Joined: Sat Aug 28, 2010 8:13 pm
Location: In your head.
Contact:

Re: Lua obfuscation

Post 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
Hello, I am not dead.
User avatar
zac352
Party member
Posts: 496
Joined: Sat Aug 28, 2010 8:13 pm
Location: In your head.
Contact:

Re: Lua obfuscation

Post 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.
Hello, I am not dead.
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Lua obfuscation

Post 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.
Help us help you: attach a .love.
User avatar
Simtex
Prole
Posts: 39
Joined: Sun Dec 14, 2008 5:31 am

Re: Lua obfuscation

Post 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.
User avatar
pygy
Citizen
Posts: 98
Joined: Mon Jan 25, 2010 4:06 pm

Re: Lua obfuscation

Post 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.
Hermaphroditism is not a crime. -- LSB Superstar

All code published with this account is licensed under the Romantic WTF public license unless otherwise stated.
User avatar
vrld
Party member
Posts: 917
Joined: Sun Apr 04, 2010 9:14 pm
Location: Germany
Contact:

Re: Lua obfuscation

Post by vrld »

pygy wrote:Why obfuscate your source when you can compile to bytecode?
That's why
I have come here to chew bubblegum and kick ass... and I'm all out of bubblegum.

hump | HC | SUIT | moonshine
User avatar
pygy
Citizen
Posts: 98
Joined: Mon Jan 25, 2010 4:06 pm

Re: Lua obfuscation

Post 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...
Hermaphroditism is not a crime. -- LSB Superstar

All code published with this account is licensed under the Romantic WTF public license unless otherwise stated.
Post Reply

Who is online

Users browsing this forum: No registered users and 9 guests