Hacker News new | ask | show | jobs
by taneq 2470 days ago
> If you're rewriting a game from scratch, how can you possibly make the new engine bug-compatible with the original to this extent?

Well you have the original source so you can derive the memory map and then just create an artificial "buffer overflow area" where the maps can write to that you then copy into the actual game data.

2 comments

According to the slides that plan fails already at step 1 :)

> Unfortunately, we did not have private or public symbols for StarCraft 1.16.1.

And then there are all kinds of complications that make the naive approach insufficient. Ok, you have a static memory map. But that's not really enough when the buffer overflows are being used to poke at dynamically allocated data structures (e.g. linked lists and GUI elements).

So you need to basically emulate the full original game and constantly sync the state (in both directions) between the emulation and the real game.

Yep, and that's exactly what StarCraft: Remastered did, according to that PDF. It wasn't easy, though.