Page 1 of 1

How to protect sourcecode

Posted: 16 Dec 2019, 18:10
by Gurrlin
Hi!

Earlier this year I did some research on what library to use when developing a game idea I have. I ended up with SmartFox but then life happened and I put the project on hold.

Coming back to it I'm trying to figure out how it would work with my game idea that will have the players hosting their own servers. How do I avoid them simply having unlimited access to the servercode and my extensions which will be a big chunk of the actual game?

Re: How to protect sourcecode

Posted: 17 Dec 2019, 07:38
by Lapo
Hi,
you could use a code obfuscator, which makes your bytecode harder to decompile and rebuild.
You can learn more here:
https://www.owasp.org/index.php/Bytecode_obfuscation

Cheers

Re: How to protect sourcecode

Posted: 18 Dec 2019, 07:35
by HTCraft
Unfortunately obfuscation isn't good protection for you code :(
In my humble opinion the best way to do this use C++ critical section code calling from Java and othewise.
Look at https://www.javaworld.com/article/20775 ... h-c--.html

Re: How to protect sourcecode

Posted: 18 Dec 2019, 09:19
by Lapo
If you make a clever use of dynamic java invocations and obfuscation you can crash most (if not all) decompilers and make an attacker's life pretty hard.
The problem with C++ is that you loose the multiplatform features of Java, unless you want to compile for multiple platforms, and C++ is reverse engineer-able as well. In the end it all comes down to how difficult you want to make it.

Cheers

Re: How to protect sourcecode

Posted: 18 Dec 2019, 19:22
by Gurrlin
Thanks for the replies both of you! Looks like I have some reading up to do :D