Page 1 of 4
Distribution
Posted: Sun Jan 08, 2012 10:28 pm
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!
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
Re: Distribution
Posted: Sun Jan 08, 2012 11:08 pm
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.
Re: Distribution
Posted: Sun Jan 08, 2012 11:36 pm
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.
Re: Distribution
Posted: Mon Jan 09, 2012 1:02 am
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.
Re: Distribution
Posted: Mon Jan 09, 2012 2:15 am
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.
Re: Distribution
Posted: Mon Jan 09, 2012 7:47 am
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.
Re: Distribution
Posted: Mon Jan 09, 2012 10:58 am
by thelinx
luac files are also platform (and sometimes arch) dependent, so that is an incredibly stupid idea.
Re: Distribution
Posted: Mon Jan 09, 2012 11:51 am
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.
Re: Distribution
Posted: Mon Jan 09, 2012 11:54 am
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...
Re: Distribution
Posted: Mon Jan 09, 2012 3:49 pm
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