Distribution

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
thetree
Prole
Posts: 15
Joined: Sun Jan 08, 2012 10:22 pm

Distribution

Post by thetree »

Hey,

Just a quick question regarding the distribution of games.

The wiki says you can combine your Lua files with the LOVE executable so users don't need to install LOVE itself to run the program. Sounds great! :D
However, it also says the resulting .exe can be opened by archiving software such as WinZip.
Is there a way to either compile the Lua into an executable C/C++ style, or obfuscate it in any way? It seems that having an entire game written in something thats really easy to open up and view and potentially edit isn't the best way of doing things.
I don't really want people editing things such as movement speed etc.

Thanks, much appreciated,

tree
User avatar
thelinx
The Strongest
Posts: 857
Joined: Fri Sep 26, 2008 3:56 pm
Location: Sweden

Re: Distribution

Post by thelinx »

thetree wrote:Is there a way to either compile the Lua into an executable C/C++ style, or obfuscate it in any way?
Short answer: No.
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: Distribution

Post by kikito »

thetree wrote: I don't really want people editing things such as movement speed etc.
If that worries you, the best kind of tool you can use is a license of some sorts. A file that says "You are not allowed to decompress, modify and redistribute this game, or distribute it without this license file" - and probably show a message at the beginning of the game, too. That sort of thing. You will probably need a lawyer if you want something more exhaustive though.
When I write def I mean function.
User avatar
Kingdaro
Party member
Posts: 395
Joined: Sun Jul 18, 2010 3:08 am

Re: Distribution

Post by Kingdaro »

you could make a regular non-love lua script to replace all '\n' characters with ' ' to make scripts harder to read, other than that I'm not sure.
Magitek
Prole
Posts: 48
Joined: Sun Dec 13, 2009 2:23 am

Re: Distribution

Post by Magitek »

kikito wrote:
thetree wrote: I don't really want people editing things such as movement speed etc.
If that worries you, the best kind of tool you can use is a license of some sorts. A file that says "You are not allowed to decompress, modify and redistribute this game, or distribute it without this license file" - and probably show a message at the beginning of the game, too. That sort of thing. You will probably need a lawyer if you want something more exhaustive though.
Sadly an honor-tank isn't much use in reality.

Your best bet is probably an executable packer, something like UPX. This at minimum should force the user to think about it, and hopefully filter out casual gate-crashers; Beyond this, you can probably find a LUA obfuscation util so that it is a nightmare to edit.

Anyone that is prepared to go to lengths to unpack your source is impossible to stop when you are using LUA/Love.
If security is a real concern for you.. you'll have to use a different engine/language.
User avatar
slime
Solid Snayke
Posts: 3132
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: Distribution

Post by slime »

You can always compile your Lua files to luac - it won't stop someone who's determined, but it will stop your average person who decides to take a peek around.
User avatar
thelinx
The Strongest
Posts: 857
Joined: Fri Sep 26, 2008 3:56 pm
Location: Sweden

Re: Distribution

Post by thelinx »

luac files are also platform (and sometimes arch) dependent, so that is an incredibly stupid idea.
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Distribution

Post by Robin »

Let me ask a different question: why would you care if they change things like movements speed? In the worst case, they make the game less fun for themselves.

If you want to post online topscores or have multiplayer or something like that, it's a different story. Then relying on the secrecy of your code is silly. Cheaters will find a way around that. You need much more thorough methods to have a chance of stopping them (or at least holding them back). And with those methods in place, you won't need to hide your source code, because even if you know the source code, you can't cheat effectively.

tl;dr: LÖVE doesn't help you in hiding the source code of your games, and you don't want that anyway.
Help us help you: attach a .love.
User avatar
slime
Solid Snayke
Posts: 3132
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: Distribution

Post by slime »

thelinx wrote:luac files are also platform (and sometimes arch) dependent, so that is an incredibly stupid idea.
Assuming by "distribution" he means release, there's no good reason not to compile to luac unless you want people to view your source code. You're in control of your own architecture, the arch of LÖVE's Lua that you use, and the architecture of any Lua version you download yourself. Many games do this already...
thetree
Prole
Posts: 15
Joined: Sun Jan 08, 2012 10:22 pm

Re: Distribution

Post by thetree »

Thanks for all the replies, and yeah I meant release.

It seems that LuaC is my only option then as I'm planning on making the game self hosted for multiplayer - similar to most console games (on the premises that it isn't going to be intensive for the network or CPU) and therefore cannot use server validation or checksums. Other ideas on how to stop cheating without having a central server are welcome.
Although I've used Lua before and C before, how might I go about using LuaC with LOVE?
Magitek wrote: Your best bet is probably an executable packer, something like UPX. This at minimum should force the user to think about it, and hopefully filter out casual gate-crashers.
I've just had a look at UPX, this used in conjunction with obfuscation would provide a safe-ish build that still works on all three operating systems, yeah?


Cheers,

tree
Post Reply

Who is online

Users browsing this forum: No registered users and 185 guests