Why is a games source code being leaked a bad thing? Doesn’t all that code exist in the games files?

1.83K views
0

I do know that that code obviously then inst available, since that’s why the recent leaks are significant…but why is it significant? Obviously cheaters will use that to more easily make hacks, but why is that code not part of the game? How does that code not exist in the game files? Is it hidden in some way or is some of that engine code or what exactly is it?

In: Technology

Because the executable files that you have are in machine code, and is unreadable by humans. Even if you converted it back to human-readable code (with a decompiler), there are probably thousands of variables which are completely unlabeled, which you’ll have to figure out one by one. And if a programmer used any unorthodox tricks, you’ll have zero chance of figuring it out.

It allows for piracy, easier and more complex hacks as well as mods. Exploit development also becomes easier.

Yes the code is already in the files. But you a human cannot read it easily. You’d have to reverse engineer it to get even close to understanding the code. A computer can easily read it.

But it’s important because most games run a anti cheat system that will monitor memory for invalid changes that say cheat engine can do. Many multiplayers have this system. Having a leaked source code allows for easy bypass of that system.

Not to mention many publisher don’t want to share code, say for instance you develop a very in-depth physics system. You want that to be what people associate your game with. If that leaks everyone else gets it. Think of Doom being the first FPS. Everyone instantly copied it.

No, none of that code exists in the game files. The machine code that is in the compiled executables contains very little of the programming methodology behind the game itself. The game code that compiles into all that machine code will allow people to rebuild the game to their own liking, without the security controls and many other features of the compiled software. It also contains many of the programmers’ notes and instructions, which will allow even more changes to be made to the original game, cutting out other sources of income for the original game developers.

You run the source code through a compiles to create the machine code that the program run.

There is no simple way to go backward in some way it is not possible at all because stuff that we use to understand the code is no longer there. An integer name HitPoints is easy to get what ís is but in the compiled code you just know that there is an integer used in a memory location like $85004F3C

You can create code in high-level language from the source code but the name of everything is gone so you have no idea what you look at and what it might do. So to say that it takes 100x longer to understand the code is not a bad initial estimation.

So the source code is like the recipe for a dish with all instruction quite easy to understand and the machine code is the dish itself. You could from the try to understand exactly how it was done but it is a lot harder.

When a developer works on a game typically they’ll be writing the source code. The source code they work on is designed to be human readable and easier to edit. It would normally use english (or whatever other language) words and decimal numbers. Like a line might have something like

if x==10, y = 5;

which is easy to look at understand. If some variable X is equal to 10, then it assigns the variable y a value of 5. You, as a person, can look at that and understand what’s going on, and if you decide you want to look out for when x is equal to 9 instead then you can make that change easily.

The problem is your computer or console or whatever doesn’t read english. ‘If’ doesn’t really mean anything to it, it only speaks in bits and logic gates. So you have to compile the code into something your computer can use. This changes your easily readable source code into more complicated object code that your computer can use as actual instructions. A person could not just glance at object code and figure out what’s happening, and you can’t really go from object code back to source code.

The object code is what normally ships since it’s what the game needs in order to actually work, and this protects the source code. It makes it harder to find exploits because parsing through object code is a nightmare for a person. But if your source code gets out then a person can go look through everything and would have a much easier time figuring out how the game works and finding ways to exploit it.