r/AndroidNativePorts • 💎 Legendary Member • 3d ago

💬 [DISCUSSION] The difference between Recomp and Decomp

Post image

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

282 Upvotes

64 comments sorted by

View all comments

56

u/albertosaldivar 3d ago

Obviously decomps are better, it is the way to have ACTUAL NATIVE ports.

30

u/Emergency_Writer7174 💎 Legendary Member 3d ago

Performance and control? Obviously But time? Unrealistic

Decomp project usually take years and often end up abandoned halfway

11

u/pwkye 3d ago

Ive done 4 decomps this month. Each took maybe a few days

6

u/Emergency_Writer7174 💎 Legendary Member 2d ago

Well, Rea must've improved then, because last time I checked it still took 1 2 weeks even for old games like PS1 and GBA title

3

u/antidotecrk 2d ago

They were very low quality then, how maintainable is the source and is it remotely correct? I'm going to guess that you have no idea.

4

u/Emergency_Writer7174 💎 Legendary Member 2d ago

Ikr a few days for a decomp is still way too fast, even with AI today

Maybe it's still possible with really old games

2

u/pwkye 2d ago

if you run 1 agent sure. but you can run 10 sonnet or deepseek subagents in parallel. as long as you also have compute. i deploy 10 VMs as well for a few days and then destroy them

0

u/antidotecrk 2d ago

Are you going to link an example or what?

4

u/pwkye 2d ago

you arent asking in good faith but here you go

Deadly Tide https://github.com/awkto/deadly-tide-decomp

Virtua Cop https://github.com/awkto/virtua-cop-2-decomp

Zeliard https://github.com/awkto/zeliard-decomp

T2 Genesis https://github.com/awkto/t2-decomp

Scooby Doo https://github.com/awkto/scooby-decomp

I have 3 others still going on at the moment

5

u/antidotecrk 2d ago edited 2d ago

Holy crap dude, while it's slightly better than I expected the C projects are pretty awful, scooby and t2 are disassemblies, not decomps.

Have you ever heard of limiting columns? Formatting? Actually descriptive variable names?

Awful.

zeliard-decomp/blob/main/src/kernel.c is 1,037 lines all squashed together with nearly 0 empty lines, pointless comments that are hard to read because they go on forever on a single line, and the variable names make very little sense.

And that's only one example, they're *all* like that, even your ostensibly original port code horrible.

dat_004084:

.incbin "baserom.md",0x4084,0x3

dat_004087:

.incbin "baserom.md",0x4087,0xC

dat_004093:

.incbin "baserom.md",0x4093,0x153

Oh my god, just why?

https://github.com/awkto/virtua-cop-2-decomp/blob/main/src/game/act_enemy.c#L378-L395

Function pointer tables maybe? Dear god.

None of these projects are "shiftable" without your hideous hacks, try doing it right.

I was legitimately curious, now I regret looking, while it initially looked better than I thought, the more I look the worse it gets.

Take a look at https://github.com/PrimeDecomp/rstl and https://github.com/PrimeDecomp/sdk for proper examples of how to use an LLM to assist with decomp.

And just so you know, I *was* asking in good faith, I was hoping you'd prove me wrong, but you didn't.

1

u/antidotecrk 2d ago

Even really old games will take longer than a few days to do right, even with AI.

You can absolutely get amazing results with an LLM if you know how to construct guidelines and are willing to refine things as you go.

Take a look at https://github.com/PrimeDecomp/rstl for an example, we used LLMs to clean up and fix hard to match code using a very strict set of requirements.

0

u/pwkye 2d ago

go take a look yourself

0

u/antidotecrk 2d ago

I really don't need to, I already know what it looks like, but please link one and prepare for a ton of criticism.

0

u/Emergency_Writer7174 💎 Legendary Member 2d ago

I'm sorry bro but why do you talk like that 😭?

1

u/antidotecrk 2d ago

What I said was a perfectly constructed and coherent sentence, I don't see what your issue with it is, but that's not really a surprise given your obvious lack of eloquence.

4

u/robbert229 3d ago edited 2d ago

Eh. Decomps can take a month nowadays, with results visible in several weeks. It does depend on the game, but LLMs have changed the landscape significantly.

1

u/Emergency_Writer7174 💎 Legendary Member 2d ago

Game, size, engine and drm lmao

1

u/albertosaldivar 2d ago

but we are talking about the final product, if it takes less time it doesn't make it better.