Concerning Source Obfuscation

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.
Post Reply
user_44
Prole
Posts: 2
Joined: Fri Jan 05, 2018 6:39 pm

Concerning Source Obfuscation

Post by user_44 »

I recently made a (.exe) file for my game, but it turns out that it's like an executable zip file, i can easily extract my source code and recode it. The websites talks about how i can compile lua code into LuaJIT bytecodes, but programs compiled with LuaJIT seems to not be able to run on LOVE for mobile, like android (at least for me), and an experienced computer dude could just decompile the source. Now I read earlier posts about this and people were saying licensing will protect my code and leaving accessible code would open doors for modding, but lets say i make a commercial game and there is a full version which is paid and a demo version that is free. If one gets the free version, they could just extract the (.exe) file, understand my code, and unlock features that were meant only for the full version (unless i remove those full version features, but what if the demo is just a locked version of the full game and the user could buy a serial code to unlock the game....)
User avatar
ivan
Party member
Posts: 1915
Joined: Fri Mar 07, 2008 1:39 pm
Contact:

Re: Concerning Source Obfuscation

Post by ivan »

Believe me, you cannot stop piracy - NOT through code obfuscation.
When you're selling your game, the goal is to make an easy and seamless experience for the paying customers.
Trying to make things more difficult for the pirates is an utter waste of time.
The only way to stop piracy altogether is to make your game exclusively online or FTP.
the user could buy a serial code to unlock the game....
Haven't heard of "unlock codes" since the shareware era of the 1990s.
Not sure why you would want to do that in today's day and age. :)
I mean nowadays we have Steam, Google Play, etc...
Last edited by ivan on Mon Jan 08, 2018 6:56 pm, edited 3 times in total.
user_44
Prole
Posts: 2
Joined: Fri Jan 05, 2018 6:39 pm

Re: Concerning Source Obfuscation

Post by user_44 »

Hmm Okay. Thanks for the quick response. I wasn't planning to put "unlock codes" it was just a what if
User avatar
RagingDave
Prole
Posts: 23
Joined: Mon Jul 27, 2015 3:12 pm

Re: Concerning Source Obfuscation

Post by RagingDave »

I think the solution for your problem is to have two versions of your game:

1) the full game containing all assets and code and
2) a demo version only containing the assets/maps/code that should be available

You could organize your code into different subfolders of your project and then only include the demo folder when you build your final game package. (This is just a simple example.. you can obviously refine that process in many ways.)
User avatar
raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

Re: Concerning Source Obfuscation

Post by raidho36 »

I'd recommend not obfuscating your code (better modding support for no effort from you), but if you want it anyway, I suggest compiling Lua bytecode and distribute your game with that instead of source code. With the way Lua is designed, even if you can decompile the code (probably not) it's nothing like the source code and is not very useful. You need to compile bytecode for each Lua and LuaJIT version individually, because they're generally not compatible.
Post Reply

Who is online

Users browsing this forum: Amazon [Bot], Bing [Bot], Google [Bot] and 3 guests