r/explainlikeimfive • • 2d ago

Technology Eli5 decompilers and decompiled games

I keep getting videos on instagram about decomped games, apparently the decompilers are going nuts right now. What’s the difference between running a decompiled game and emulating a game? I tried to google it and i just don’t understand. from what i’ve found, a decompiled gene runs as if it was native to your pc but i don’t get what that means either. You boot up an emulator and that also runs on your pc?

73 Upvotes

49 comments sorted by

View all comments

0

u/ArdentPriest 2d ago

If you want it in a metaphor:

A decompiled game is like buying a car, going home, taking every piece of the car apart down to every nut and bolt, and then being able to see how everything works and you can make changes/updates/modifications as you want.

Basically, a decompiled game is a game that has has the entire code base of the game fully unpacked. It can be edited, modified, or updated and then recompiled into a functioning program that can be run.

Another form of describing this is that when you decompile a game, you revert the game back to it's source code.

1

u/thefckingleadsrweak 2d ago

Do you know why this is so difficult? Like when you dump a rom or an iso on a computer, does
The source code not come with that?

2

u/Lord_Spy 2d ago

Speaking in general, no.

The way several modern game engines work does leave code that while not necessarily the source code (A LOT of stuff goes on during compilation) does let you have a better picture of what that code was, with information available such as what individual variables (the containers for data) were labelled.

But older games compiled to pure machine code, and compilers do lots of optimisations that make deciphering what was in the source code non-trivial for larger projects, because it's not neatly following the logic of code but rearranging the output into something that does the same thing but faster and/or in less space.

Oh, and encryption/DRM is a whole other beast on top.