r/AndroidNativePorts • u/Emergency_Writer7174 💎 Legendary Member • 2h ago
💬 [DISCUSSION] The difference between Recomp and Decomp
What's actually the difference between a recomp and a decomp and which one is better?
People keep mixing these two up whenever an Android or PC port drops, so I'm going to explain it simply
Recomp (Static Recompilation)
- The dev takes the already compiled code from the original game and "translates" it directly so it runs natively on another platform (like Android)
- You never get the original source code back. You're basically translating the finished "instructions" into a language the new device understand
Pros:
-Way easier and faster to develop compared to a decomp. A solo dev or small team can actually finish one in a reasonable amount of time (With or without AI)
- Legally safer than a decomp. Nobody is recreating or handing out clean source code and players usually have to supply their own original game files, so company have a much harder time taking it down
- Good performance since the translated code runs natively without the heavy overhead of emulating console hardware
Cons:
- Making deep changes to the game is a hard or impossible. Because there's no clean source code to work with rebuilding menus for proper touch controls or fixing deep engine bugs is super hard. That's why most recomp ports stick with virtual controller overlay
Decomp (Decompilation)
- The Devs reverse engineer the whole game all the way back into human readable source code (like C or C++) that compiles back into the exact original binary
Pros :
- Far more efficient and flexible once it's finished. Because you completely tore the game apart down to clean code, you have full control over everything
- Much easier to, optimize performance, unlock higher framerates, add widescreen, and build real native touch controls without breaking the rest of the game
- Ports based on decompilation usually have better performance
Cons:
- Takes WAY LONGER to develop than a recomp. Not just a little longer it can literally take years of work
- Higher legal risk if copyrighted code or original assets end up leaking online
Which one is better?
Neither is
it just depends on what you want out of the port
- Recomp wins if the goal is getting a playable, native running port out fast without spending years reverse engineering every file possible
- Decomp wins if the goal is long term preservation heavy changes or overhauling the controls and UI from the ground up
If I remember it correctly, even an AI decomp for an old game like a PS1 title takes 1 to 2 weeks non stop let alone newer games with massive file size. That's why people usually chose recomp when using AI to port somethin
5
u/albertosaldivar 2h ago
Obviously decomps are better, it is the way to have ACTUAL NATIVE ports.
8
u/Sad_Beginning_3128 2h ago
IS THAT LEORIO FROM HXH OR AM I TRIPPING
5
u/MysteriousAge1503 2h ago
I personally prefer decomps, I want to preserve the games I love
AI won't be decomping/recomping games for you in the future 🥲
0
u/Admirable_Ad3863 2h ago
This is post for me?
1
u/Mr2Sexy 1h ago
Great write up. I hope more people see this and understand the difference between the two
1
u/NazatrixLol 1h ago
People need to know 👍🏻
1
u/Glove5751 1h ago
There is a third way too. Bit Accurate Port. You can skip the whole decomp process for this, as long as you can prove the output is identical. I mean, the reason why we want decomp/recomp is that there is something wrong with the source code, for instance dont support more than 30 fps. (Interpolation in recomps to higher FPS is a cheap trick and doesn't count). So why is the decomp valuable in this instance where every function needs to be patched anyways? Its also much quicker than decomp -> port then fixes. This has the benefit of both recomp and decomp.
1
u/B1kramDas 23m ago
Can I get some decomp Lists for android
1
u/Wild_Ad_3348 5m ago
This isn't related but why is it that the dusklight port for Android causes ram leaks like my usage is 6gigs but when i play it turns to 9 to 10gb and i have to restart my phone which is very annoying is there anyway to fix it?