Is there an OBFUSCATOR to protect scripts? I see only compile to binary or encrypt scripts but this can be cracked in like few minutes! What you guys doing to protect your scripts?
Does a GDscript OBFUSCATOR exist to protect my million dollar script?? :D
My game is too simple, if someones want to reproduce it, he doesn't even need my scripts. If the guy is a good coder reading my scripts and make them working, would slow down his work. So I don't planned any special protection. I hope you will get more helpful answers.
With a strong encryption password there is no possible way that your script "can be cracked in like few minutes!". At least if you do not have computing power like a not well known agency... So I am wondering if you are just trolling.
It's definitely possible to use the existing features to encrypt in a way that the majority of people will not be able to figure out, but the idea of having unbreakable encryption is a myth because even games from large AAA studios have been broken into with assets ripped out.
The only solution for perfect protection might be encryption based on Quantum Mechanics, but chances are you will need new hardware for something that is only theoretical.
As far as I know, and according to this GitHub issue, there is no way to obscure your GDScript files. You can take a few steps to make it harder for someone, like protecting your assets with a password or ‘compiling’ GDScript to binary, but someone with enough time/dedication will be able to get through it.
As @Ace_Dragon mentioned, if large AAA studios with the latest encryption software have a hard time keeping people out for more than a few days (or in some cases, hours) then as a indie developer it will very hard and the results will probably not be worth the effort.
Personally, I wouldn’t worry too much about it. The majority of users who download your game almost certainly will not bother to try to look at the source. Of the small percentage that decide to try, many of them will only have a passing interest if you add something like password protection.
I would instead just try to make a great game and not worry too much about it right now. If you want to protect your game from the majority of people that might try to look at your code, just protect it with a password and/or ‘compile’ the GDScript code.
Or, another approach you could take is write your game in GDScript, and then convert that code into C++ and compile it. That won’t make it impossible for others to decompile and see the code, but it would make it a lot harder than GDScript. That said, it would require writing your entire game in C++, so it is a trade off.
I should note, what I have written is based on my own experience and speculation
Thanks for the answers,
encryption is not secure with gdscript because godot is opensource, anybody can simple look and see how encryption is implemented and retrieve the key (location) from the compiled game, its not hard, you dont need a powerfull computer for that because you don't even have to bruteforce anything in the end ;)
Obfuscation is a whole different thing because it does not encrypt anything (there is no key), it just mangels/refactors/renames/injectsdeadcode/tamperprotects/etc. your script, the code is still readable but not understandable and reverse engeneering would take so long - forget about it.
I use js mainly for my work and there are lot of good options out there like; - https://jscrambler.com/ - https://obfuscator.io/ which provide a real protection. Check them out to see what i mean, especially the second tool, its free and opensource.
After searching forums now for two days it looks like serious code protection for gdscript is out of the scope for now, sadly.
PS: Asset protection was also mention above, but thats another story, im talking here mainly about gdscript.
Ok, you are right about the encryption topic. Does not make sense, because one has to provide the password/key within the game data. I am just wondering after reading https://github.com/godotengine/godot/issues/19790 and https://github.com/godotengine/godot/issues/12452 how other game engines like Unity or Unreal face that problem?
- Edited
Deobfuscation also exists, where you take obfuscated code and it tries to unmangle it as best it can with readable variable names and so on. So it's very hard to stop someone from stealing you code if they really want to, this is true for all games of all sizes.