Page 1 of 1

Concerning Source Obfuscation

Posted: Mon Jan 08, 2018 5:59 pm
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....)

Re: Concerning Source Obfuscation

Posted: Mon Jan 08, 2018 6:36 pm
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...

Re: Concerning Source Obfuscation

Posted: Mon Jan 08, 2018 6:41 pm
by user_44
Hmm Okay. Thanks for the quick response. I wasn't planning to put "unlock codes" it was just a what if

Re: Concerning Source Obfuscation

Posted: Mon Jan 08, 2018 6:43 pm
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.)

Re: Concerning Source Obfuscation

Posted: Sat Jan 13, 2018 3:33 am
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.