Prince of Persia 2's Weird Running Jumps and a Fix For Them
Prince of Persia 1 has a unique system for jumping and some mechanics that make them easy to execute once you're used to how they work. This is how they work on a mechanical level:
It takes some frames into the running jump before the prince leaves the ground, so you need to press jump well before an edge.
But the game is willing to "fudge" the player position quite a bit. If you're roughly in the correct position (which is a little over one and a half tile away), it'll snap the prince to a position that makes the player aligned for a perfect jump.
If you try to jump with an edge that's 2 tiles ahead of the player but the player is still too far away to make the jump, then the game will delay the jump until you're closer. That means there's a fairly big input window for executing perfect jumps.
However, Prince of Persia 2 made jumping way harder due to a few rather inexplicable changes:
First of all, it does actually make running jumps a bit easier with one specific change: it's willing to "fudge" the player further back when you start the jump. This means you can press jump later and it'll still succeed. It also means you need less space for a running jump -- you only need 2 tiles total from a standing state.
Now for the bad news: POP1 allows a jump to start during any part of the run animation loop, but POP2 only allows it for 2 of the 8 frames in that loop. That means, at what can feel random, you can get a delay to a jump that can be as far as one tile. This can make you fail jumps, and otherwise, it just feels janky getting a delay for seemingly no reason.
Even more bad news: POP1 delays a jump if the player is close to an edge but not close enough for the jump -- POP2 doesn't do this. This substantially tightens the starting window for a jump (I'm not sure of the exact distance, but somewhere between a half tile to a full tile).
I've seen some people welcome this extra challenge, but I personally dislike it, especially the random delay you can get. I found the code related to the running jump and I made modifications people can apply to the executable if they want it to function the same way as in POP1.
Prince of Persia 2 v1.0 executable:
Open the executable in a hex editor and apply these changes:
Offset: 0x3197F: change 74 to 7D
Offset: 0x31A53: change 0B F6 7D 09 83 FF 04 75 04 2B C0 EB 28 to 83 FE 00 7C 08 83 FF 04 75 03 EB 25 90
I've attached a version of this executable with the changes already applied to this post if you're not experienced using hex editors. Note: v1.0 is the release version of POP2.
Prince of Persia 2 IR executable:
Open the executable in a hex editor and apply these changes:
Offset: 0x3126D: change 74 to 7D
Offset: 0x31353: change 0B F6 7D 09 83 FF 04 75 04 2B C0 EB 28 to 83 FE 00 7C 08 83 FF 04 75 03 EB 25 90
Note: "IR" is a pre-release version of the game that's overly buggy. I highly recommend people avoid this version. It actually has a bug that makes running jumps even harder by preventing the player from being able to "lock onto" loose tiles when performing running jumps. There's also a v1.1 that was released in '98, but I wasn't able to find the relevant code in that executable. That said, v1.1 is buggier than v1.0, so I think v1.0 is the best version of POP2 to play.
Prince of Persia 2 Xbox executable:
Offset 0x9755B: change 74 to 7D (search for 74 28 66 3D 0B 00 74 22 if offset is wrong)
Offset 0x9763A: change 7D to 78 (search for 7D 11 66 83 F9 04 75 0B 5F 5E if offset is wrong)
Note: Xbox version was released as part of Sands of Time in 2003. I think this port was based on the v1.0 codebase.
Prince of Persia 2 FM Towns executable:
Offset: 0x13EF1: change 74 to 7D (jz to jge) (search for 74 23 83 3E if offset is wrong)
Offset: 0x13FD5: change 7D to 7C (jge to jl) (search for 0B DB 7D 0C 83 if offset is wrong)
