How to protect sourcecode

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

Post Reply
User avatar
Gurrlin
Posts: 2
Joined: 16 Dec 2019, 17:43

How to protect sourcecode

Post 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?
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: How to protect sourcecode

Post 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
Lapo
--
gotoAndPlay()
...addicted to flash games
User avatar
HTCraft
Posts: 27
Joined: 28 Jun 2018, 09:51
Location: Moscow, Russia
Contact:

Re: How to protect sourcecode

Post 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
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: How to protect sourcecode

Post 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
Lapo
--
gotoAndPlay()
...addicted to flash games
User avatar
Gurrlin
Posts: 2
Joined: 16 Dec 2019, 17:43

Re: How to protect sourcecode

Post by Gurrlin »

Thanks for the replies both of you! Looks like I have some reading up to do :D
Post Reply