Code Protection

I would like to know whether you are using obfuscation or some other code protection methods against light hacking.

C++ is compiled to machine code.
Obfuscation there is pointless.

Why do you need it? Do you think someone wants to steal your code?

Oh, I’m not so cocky. I do not think that someone will steal my code. I would like to encrypt some parts of my program to avoid hacking and cheating

Maybe you can give this a try, the source is open for you to modify if needed :wink:

Of course I will try. Why I haven’t found this before?) I have already found some useful ideas, I will try to use them.
Thank for the link

Valve, EA, and Blizzard cannot stop hacking, they can only ban those detected doing it.

You have zero hope as an indie dev to stop hacking short of making a 100% server side game.

I do not think there is a 100% chance to protect the code, game or program from hacking. I want to complicate hacking process and make it really hard

Yes, the only thing you can do is “rise the bar” a little.
At least you won’t let anybody using cheat engine to mess around with your game…

If your game is a standalone application without any server connection, you are doomed, because there is no way to avoid hacking. But if you have a server connection and certain stats and formulas are only handled at server side, then you have a better chance to avoid at least the critical hacks (the ones people will hate most, ie: super stats), some other things are just hard to avoid, like seeing through walls, radars, etc.

Anti-cheat programs have “predefined” tables in the form below, for each game they’re verifying:


File Name | File Hash

When a game is booted (via Steam, Origin etc.), this type of program (i.e. BattleEye, AntiTCC mutator for older Unreal Tournament games), compares what the player is has in their PC against what the player is supposed to have. This method is a reliable form of protection against most mainstream cheats, such as wall-hacks, radars and any injections of any form (i.e. players delete meshes in order to see through buildings or modify a DLL/SO to call custom functions).

Although that will not detect DirectX mods or shaders injected on the GPU.

Fortnite is proof it can’t be detected lol, so many cheaters…

It’s very simple the way it works:

  • change rendering API from PC’s lower level devices, hook some Windows API functions. Then any skeletal mesh will render as a flat red body, anything else flat white. Then run a mouse script to auto fire the shotgun everytime the pixel at screen center is between a certain rgb color range.

They do that without even touching Fortnite’s binaries. And it’s anti-cheat believe everything is fine.
Epic could implement a mechanism to upload a screenshot everytime someone win a match, I think they’d be surprised on PC white screenshots all over the place :stuck_out_tongue:

Apparently, I’m a bad cheater. I even did not think about some things before. Thanks for the advice. Now I have something to think about.

It all boils down to how much you want to invest to protect something (anything) and if the cost and effort will worth. I remember in the beginning of my developer career (not as gamedev) someone wanted to protect their software where each copy cost US$ 3k but they got a potential list of purchasers not going far from 300 units, so the question was which amount of money they could afford expending to protect a potential 300 x 3k sales… see that they could only sell 10 copies if much. The question would be easier to answer if the software has a cost of US$ 100k per unit.

I do not have a very large budget and I do not expect a huge number of users. I think I can to spend about $ 500 to start