I would like to ask, is it worth being afraid of decompiling the code after building the game, and is there any protection against this in ue5? Since the game can be easily decompiled on unity if you do not put protection. Do I need to do this on ue5?
Hey there @DaNKuLYT! While technically it’s possible to decompile minor bits of the game, it’s not by any means easy, and even when you extract them what you get may or may not be usable. For reference, there’s dedicated teams of people who datamine and try to extract things from Fortnite and almost none of what’s decompiled is useful. Even better, if you’re using Pak files you can add encryption to them as well.
Nothing you do is going to stop a determined hacker from reverse engineering your game. I guess the question is, why are you so concerned about it when you could be focusing on making a great game instead?
There’s bad and good and good news.
First, the bad news is that, no matter what you do, a determined reverse engineer will be able to de-compile any program you ship. This is a simple fact, because the CPU needs to be able to execute the instructions, so clearly the cleartext instructions must be recoverable on the client machine, and the attacker has full access to the client machine. Worst case, they can use a virtual machine or emulator, if you’re trying to play tricks with kernel mode drivers and self-modifying code and the I-cache. (don’t do this. it has bad compatibility, and it still doesn’t work.)
Second, the good news is that Unreal Engine is built in C++, and de-compilers for C++ generate much harder-to-read code than de-compilers for C#, because x86_64 or ARM64 code is much harder to read than MSIL code.
Third, the even gooder news is that essentially no working professionals in the game industry actually worry about de-compilation. If someone wants to learn how to program games, there are good tutorials and classes and other resources to use – the work of de-compilation is much harder than taking the “real” path to learning. And if someone wants to cheat your game, if it’s a single-player game, just let them (it’s their enjoyment!) and if someone wants to cheat your networking game, you’ll want to put all the authority on the server, where the attacker can’t get at it, and you can detect de-sync from attempted hacked clients. (There’s still the problem of aimbots. Which is best handled by platform providers for the consoles, and with careful matchmaking in PC games.)
Somewhat related to decompiling, is asset ripping. Asset ripping can be more trouble, because it’s easier to re-use a texture or a model than it is to reuse some small snippet of code from your game, but if you find this, that’s what the copyright courts are for. (And, again, it can’t possibly be protected against, because the client computer needs to be able to read the asset to present it, and the attacker can use a simulator or virtual machine.)
So, yes, C++ decompilation is harder to make sense of than MSIL decompilation. But, also, don’t worry about it. Really, don’t. Build a great game that people want to buy and play!
I understand your point, but, asset extractors are becoming very good in extract even game code. And some very nasty people are porting your game to other platforms unde their names, full of ads. So, or you port yourself before than them your game, or you loose a big chunk of the possible players. But even this dont stop them to just release your game with another name, like this example (it uses unreal btw)
Ripoff:‎Duck Side Shooting Simulator on the App Store
Original: DUCKSIDE on Steam
The bad news is that it’s impossible to prevent bad people from doing bad things.
The good news is that you can beat the bad actors to the punch and ship on the other platforms yourself.
You can also police the platforms and file DMCA takedown notices for any infringing content. (Or rent a service that does this for you.) If your game is actually good and makes money then it’s worth paying for this service. If your game is not any good and not making any money, then it might make you sleep easier to just not worry about it.