I’ve heard many times that the reason the Silent Hill remaster collection didn’t turn out so well was because Konami lost the original source code and had to re-create it. But I don’t understand how that is possible. If they were selling copies of Silent Hill, why couldn’t they just take a single disk of it and datamine the source code off of it? How could they possess the game without possessing the game’s source code?
In: 1563
Source code:
int main() {
create_world();
create_player();
create_enemy();
game_loop();
return 0; }
Compiled code (code found in the discs on shelves):
1Dj4KD&*^3la”‘s;2(A)*@#&AD*)LDK
Disassembled (data mined) code (can’t write actual assembly so I’ll just write roughly what it does):
Move object to register one
Jump to line 23
Copy register
And so on.
Now, there’s a lot you can learn from reading disassembled code, and you can find tons of useful information about how a program works, particularly in terms of some of the simpler game logic (oh, hey, this point of the game calls this API) (oh hey, the the game compares these two values here) (oh hey, you could probably exploit this because the integer will overflow…), but it’s of limited value in re-creating the original source code, and you’re basically stuck coding the entire thing from scratch because there’s not that much relation between the disassembled code and the original source code, because often times the code as you see it in the source code will be pretty abstracted from the what the code actually does, in the same way a king might not know a ton about what tunnels a miner goes through to find coal, but he can delegate that the miner does mine coal through his chain of command, and the king might understand the purpose of the mine, and its importance to the political situation of the kingdom.
If you got rid of that chain of command, but somehow had a list of every step a miner took (I walked two steps forward, turned thirty degrees, took five steps forward, stepped to the left, and so on) the King wouldn’t necessarily immediately know how to manage individual miners.
Code is much the same way.
Latest Answers