This is a TAS of Prince of Persia: The Fallen King, the spin-off sequel to the 2008 reboot of Prince of Persia. All the known glitches and sequence breaks as making it are used.
Co-commentary by Smathlax
Game objectives
- Emulator used: DeSmuME v0.9.9
- This is a any% / no restrictions TAS
- The objective of the game is to reach credits after defeating the corrupted king (final boss).
History of the game
The game is actually a direct sequel to the 2008 Prince of Persia reboot and the Epilogue DLC. Not exactly the most well known Prince of Persia game, it came into the limelight of the Prince of Persia speedrunning community when two gentleman who go by "Smathlax" and "CurlyJefferson" randomly decided to do a blind race of this game. While the latter understandably stopped playing after a few hours, the former was dedicated to completing the game and did so after a whopping 9 hours! Thus, the leaderboards were setup and Smath did a few more runs to push the time down. It was at this point that I decided to join the scene, the presence of more than 1 runner motivated both of us to find and document time-saving strategies. Smath holds the world records for both console and emulator categories at the time of writing this.
About this TAS
I knew I had to do a TAS of this game the moment I realised it had the necessary tools, but the deal winner for me was the discovery of what we call the ceiling clip glitch. I think it made the run much more interesting in the RTA scene, but most importantly, there were suddenly many many spots where there were timesaves that aren't really worth outside a TAS. The game almost exclusively uses stylus controls, other than the one button for magic powers. We often refer to it as being "potato" as it can be unresponsive and sometimes buffer unintended actions. Luckily it is not felt much in a TAS scene. The most exciting aspect of the TAS for me was to essentially to make a single player game look like a 2 player game by timing Zal's magic powers in the middle of the Prince's actions.
We start by opening a new profile and we a greeted with a dialouge segment as soon as we start the game. In these sections its possible to click a few frames before the entire text of a page load to proceed to the next page or a fade.
1-1
This level introduces the basic parkour mechanics. Its really easy to lose momentum at the rolls, so its important to watch out during those sections. The fastest movement is just running whenever possible, every roll loses a handful of frames. Whenever there is an obstacle that can be broken with our sword, its fastest to dash to it as soon as its on screen. Everything else in the level is quite trivial.
1-2
More mechanics are introduced here. At the start there is a closed door that is opened with a button. Most of these buttons will play out a camera pan to show the door opening. The prince cannot be controlled as long as there are these black bars on screen and any horizontal momentum he has is instantly killed. On solid ground the fastest way is to keep running whenever the game lets you. We see the crow enemies, which are essentially the same as rocks for the purpose of this run. Its worth noting that whenever we hang from an edge, we will do a frame perfect turnaround which lets the prince fall quickly skipping the hanging animation. Then we get to the first life upgrade door that the game forces you to get with 10 coins. I hope you liked it because we will never see these again in the run. We proceed further and we get to do the first "longfall", where the prince can fall any amount of distance as long as he has something to grab to at the end. Then we get the first actual combat. The game lags significantly in these sections. The fastest way I found to kill the yellow guys is to do the standard 2 hit combo and cancel the second hit by blocking. In the wall climb sections, constant jumping is slightly faster than wallrunning, but at the very end, its worth to just catch the edge by any means rather than doing an extra walljump.
1-3
This level introduces the boulders that break only with a charge attack. Other than that there isnt much to talk about this level, it has more enemies, boulders and button and some lore at the end.
Map
Its worth noting that it doesnt make a difference which level we go first when multiple levels open up at the same time in most cases. The next stage will open only when all of these levels are finished, and the total distance walked will be same in the end.
1-4
In the first walljump section, we see technically the first ceiling clip of the run where the gap narrows. Ceiling clips happen when the jump off a vertical wallrun is buffered before the prince hits collision and starts grinding down. We are also introduced to spike traps. On the floor, you can damage through them by rolling which cancels any kind of stagger. On the walls, there is no choice other than waiting for them to go in otherwise the prince falls to his doom. Also one damaged by something, the prince also never gets staggered during his invincibility frames, which is really handy. We go to the end of the level and collect the blue ruby.
1-5
At the start we dash to boulders as its quicker in this specific scenario and block to cancel our dash when close to them and then do a charge attack to break them because dash will only produce a normal attack. We are introduced to saw blade which be dodged or damaged through depending on the scenario. We can see one of the actual big time saving ceiling clip in this level. There are now also enemy fights where there are barriers that prevent us from proceeding further until all enemies of the wave are killed. At the end of the level, we do another ceiling clip that skips the ruby which was like the whole point of this level. The game thinks we got it anyways so its all good.
1-6
We are the end of this world and we have a boss fight. This fight is surprisingly interesting atleast in a speedrun as there is a strategy to skip a couple of cycles. Normally when 1 full HP is taken from him, he becomes invincible and goes to the next cycle. But by using a charge attack after a normal hit, he goes from losing 0.5 straight to 1.5 so the game doesnt register that it must be advanced. At 2 there is a hardcoded script to go to the next phase however so we cant skip more cycles by repeating this again and again. Thus the boss is finished in 2 cycles rather than the intended 4 saving a lot of time. Onto world 2!
2-1
This level introduces a mechanic where we can instant kill enemies after a vertical wallrun. There are also a couple of huge ceiling clips that save a bunch of time as the sections they skip involve waiting for cycles and stuff. It also introduces the mud section where the prince cannot run but only slowly walk. Luckily he can still dash to boulders which is even faster than running. Great logic ubisoft. A really straightforward level with a lot of skips is promptly finished.
2-2
This level is a game-changer, literally. After a trivial starting section, we get to meet our friend for the rest of the run, Zal. He has ability to do magic. Right now he has the ability to shoot magic balls that activate gems, and it is put to immediate use as we use one shot to activate all 3 at once to open a door blocking our path. An important thing to note about magic powers is that when they are use we immediately lose control of the prince, so to eliminate or atlest migitate that timeloss, we must try to use magic only when the prince is in the middle of an action. As we proceed, we meet the enemy who I would like to name "the most annoying enemy in the game". Currently the way to defeat him is slowly pushing him back with magic balls and then he will eventually be far enough that we can climb and finish him off. Spoilers, we will get our revenge against this guy. Remember when I said you need to kill all enemies in fights where barriers pop up? I lied. By carefully timing our position as the enemy spawns, it is possible to get pushed out of the barrier by the enemy which in this case just finishes the level. This trick requires a very specific requirement - the spawn point of the enemy and the barrier should be close to each other, hence unfortunately not possible everytime but luckily it is in a good fraction of fights. I will call this the barrier skip from now on.
2-3
The theme of this level open these gem doors, frankly they will become a staple in the entire game really. We also see moving platforms and immediately see that its possible to do an airstep of them which is sometimes advantageous. Oh btw these giant moving walls can be wallrun on only when they come to rest. We are also introduced to these corrution plants that can be shot down with zal's magic but its faster to just damage through. Other than that there is nothing much to say about this level, it was really fun to make, watch back and correct.
Map
Sometimes we can do this funny thing where he keeps running into a invisible barrier during any cutscene in the map if we click on the next level during few frames after the load and before the cutscene starts. It actually saves time as the prince is able to move while the black bars disappear. And sometimes its also possible to skip dialouges in maps if we enter the level before it has time to start.
2-4
This level consists of a lot of spikes and fights. The wallspikes make us wait for their cycles. Barrier skip is possible for the first fight, but not the following ones. Whenever there is a dialouge or a cutscene in the middle of the level, its worth rolling right before it triggers as the prince completes the roll, unlike the door opening buttons which strip the momentum. There is a ceiling clip at the end of the level that lets complete the "puzzle" faster. Past the door we see the eyes of Ormazd which need 8 magic balls to be destroyed. This particular one is trivial and it doesnt matter how its destroyed, as we also need to wait for the door anyway.
2-5 I
This level starts with some moving platforms and casual ceiling clips. In some of these clips we actually first go the corner where its possible to stand for a few frames and then ceiling clip from there. As we proceed our friend Zal is unfortunately kidnapped by some creatures, and we need to return to 2-2 II to save him.
2-2 II
Zal is corrupted at the start of the level, hence we need to free him by hitting him in the head a couple of times. Now we have also unlocked a new power which is being able to control elastic corruption. This is mainly used to move stones which creates a neat platforming mechanic basically. We go thorugh the bottom path of the level which was unexplored last time we were in the level and the path converges at the gem door. This time we get our sweet revenge on Mr. Most annoying enemy in the game by making the elastic corruption eat him. And then we do the barrier skip again to finish this level for good.
2-5 II
The start is obviously a repeat, as we proceed we encounter more moving platforms and do more ceiling clips. There are also sections where elastic curruption is put to full use in platforming. At the end the game teases us by having the exit 2 cm out of reach after rolling before the dialouge section, but its no big deal, we finish the level.
2-6
This level starts with really fast moving stone walls that can be stopped with elastic curruption. Then we are introduced to coloumns which are a really fast way of vertical travel. And then we see the purple door opening thing which can only be operated by Zal and we lose him until we finish our job and return. Or do we? In the second section involving this contraption, we can do a very precisely timed roll and let go of Zal at a precise timing to both get through the door and avoid losing him at the same time. This saves a lot of time as we dont get to go back to retrive him from above later. And we are at the end of the level.
2-7
Falling rocks, moving platforms, fights skipped with barrier skips, moving on. Our friend Zal gets into trouble once again by being currupted by bugs, and when he gets stunned, we need to save him by rubbing the stylus on him and get him an elixir granted by the someone called the ancestor. For some reason there the end of the level has awkwardly no music.
2-8
The level starts normally. At the start there is a enemy who is a bit bugged if we dash towards him so we one shot him with a charge attack instead. And then a casual ceiling clip leads us to the main puzzle of the level. The goal is to get the 3 gems to open the door and on the way we deal with some horny enemies. One of them we even had to dodge, for the first time in the run. And we do the funniest barrier skip of the run to skip a fight before the last gem. Past the door we deal with some autoscroller-esque section with some deadly saw blades to finish the level.
2-9
The level starts straight with a gem hunting session involving a lot of elastic corruption shenanigans. The middle one is the trickiest as we need to optimise the distance from which we can shoot without being so far that the magic ball despawns. The last one has a interesting strategy where we can death abuse to quickly return back. I say it is interesting because this is literally the only gem in the game that exhibits this propertly as far as I know. We do a quick work of the first one on our way back. Then we deal with the eye of Ormazd, this time it is far away but it is possible to snipe it from below without having to go near it. We do it while also approaching the door as it saves a lot of time being as close to door as possible in the cutscene. Rest of the level is fairly trivial, we use our magic balls to clear the corruption plants as taking stagger would lose time here and there is no space to roll.
2-10
I will be frank, the rest of the boss fights are relatively boring. There is no way known yet to speedup the scripted phases, the only optimisation comes from doing the individual phases as quickly as possible, even then there is a lot of wait time. Luckily it doesnt take more than a couple of minutes. World 3 here we come.
3-1
We are introduced to the corruption latch which we can use to reach places. The only condition is that there should not be any solid collision in the straight line between the prince and the latch. I will refer to this as "TK" (short for 'telekinesis') from now onwards. If an enemy is on the way, it will be instantly killed. Some elastic corruption contraptions later, the level is over.
3-2
In this level we are introduced to the explosive ball. Very straight forward level with gem door at the end after a ceiling clip. Here I hit the first 2 gems at the exact same frame which saves a little time and finish the level.
3-3
Another straight forward level. Here we can see a glimpse of how TK can be used to fall really great height. As long as there is a latch at the end, any height is now survivable.
3-4
This is level is another elaborate gem hunt. We are introduced to swing poles - a certified Prince of Persia classic. Later in the level we are introduced to two new type of enemies. First is the red shield guys, who have a shield that we can just yeet using Zal's powers, so effectively they are just normal enemies with double health. Second is the normal red guys, arguably the toughest enemies in the game. The only way to damage them is to attack them after parrying, but we avoid them in our very first meeting with a barrier skip. Rude but hey speed is important. We clear the door, destroy the eye and finish the level.
3-5 I
Another Zal kidnap level. We do a longfall TK, actually fight the red guy finally and level is over, we need to return to 3-2.
3-2 II
This time Zal unlocks the power to move around the explosive balls. This power and the puzzles involving it are a pain in RTA speedruns, but because of TAS controls, it is such an overpowered mechanic. It can be taken anywhere in the screen within a span of few frames and the best part is that it clips thourgh collision if its moving fast enough. After that the game intended us to take a different path through the level but we do a ceiling clip to converge right in to the same path we took earlier, rest of the level is pretty much a repeat.
3-5 II
As we continue past the point where Zal was abducted, we see another longfall TK and some increasingly more complex contractions where we can use the explosive ball to hit unreachable buttons to open doors. Except its not complex at all when you can pretty instantly teleport the balls to the buttons. My favorite one has to be the part where I was able to skip waiting for the chasing saw blades and was able to open the door early while also dealing with corruption plants. I would be lying if I said I calculated to escape that part with 0.5HP left. Seeing these sections done like this makes me feel like getting revenge for all the pain I had to go though in RTA runs.
3-6
This level starts of relatively normally, and slowly we start to break it starting with some longfall TKs, and then a ceiling clip followed by elastic corruption + explosive ball contraption which we managed to get through without stopping at all. After another longfall TK, we do whats a called a loop skip, where instead going all the way around, we simply grap the explosive ball from out of bounds drop it on the button that opens the final door. It is also droped such that its takes as long as possible to hit the button because meanwhile we can cover some distance, which would in turn save time in the camera pan cutscene.
3-7
This level start with the most annoying and elaborate explosive ball contraption in the game, but with the tools at our disposal we can make quite the quick work out of it. Next is a section which has a lot of coloumns, swing poles and latches. A lot of minor optimisations here including a longfall grab at the end. As we proceed, we get to see a new type of boulders - that can be controlled by Zal. Quite unlike the explosive balls, these are extremely heavy and cannot be moved more than a few pixel per frame. Otherwise we would lose control of it. I would say these are somehow more annoying while TASing than in a RTA run. But anyways, luckily these sections are not too frequent and doesnt have many complicated possiblities, we proceed to finish the level.
3-8
This level is a gem door level. We start with a stylish longfall TK while also escorting a explosive ball to its fate. Zal gets corrupted by the bugs again and conviniently get unconsious while being in the middle of a saw blade trap. We rub to wake him and use the explosive ball to break two concrete blocks at once. This is possible solely because we can clip it in between within one frame. We see another instance of the same later in the level. There is a ceiling clip off a coloumn that is really neat. And for the final gem, since ubisoft is excellent at coding collision we can shoot it thorugh a loose spot and it skips an elaborate explosive ball task in the room. Rest is just formalities aka destorying the eye and finishing the level.
3-9
This level is pretty much the same as the previous level with different contraptions. Some ceiling clips as usual. Its worth noting that Zal's magic balls dont interact with any object that zal himself can control, this includes the flame thrower traps and latches. So for all the 3 gems we shoot through them to unlock it. The final one is especially funny as there is a door behind the latch but once again beautifully coded collision comes to our rescue. The eye in this level is placed in the most annoying possible way where you can still barely hit it, but the level is done with that.
3-10
This boss is imo the more interesting one apart from world 1, we can use his own explosive balls to damage him immediately when he runs out of i-frames. And that completes the world.
4-1
Zal now has a new power to create a shield around the prince to save him from certain traps. The only such trap in this level are the falling explosive balls. Why would we need the shield when we can control the balls themselves? Doing the latter makes me feel like some star wars wizard using the force. The fights in this level both can be barrier skipped. We again get to do 2 gems in one frame at the end and even get a clearer picture of what is going on. And that leads to the end of the level.
4-2
We are introduced to slopes at the start. We can either jump off or continue running at the end if there is ground. 99 out 100 times its faster to jump off anyways, and that 1 time doesnt exist in this run. Then there is a saw blade section where enemies are automatically killed while the prince is escorted by the blades as he performs a king walk. Then there is imo the funniest skip of the game. There is supposed to be a elaborate contraption where we get a boulder rolling to open a door for us, but for some reason the door stays open for a little more than it should and that gives us enough time to just roll under it. In the next section this is not possible and we have to settle for the intended method. And then there is a section where fetch a boulder from below, which is isnt really supposed to possible as it can be extremely finicky to maintain our position in the air and control the boulder at the same time. Its easy enough in a TAS though and saves a lot of time, we just proceed to finish the level.
4-3
This level introduces what I like to call corruption dung. It's basically the same as any other ground traps we have seen so far as of now. There are couple of ceiling clips but otherwise a very straight forward level.
4-4
This level introduces corruption air which only Zal can go through, hence we have to control both prince and Zal on their own path seperately. Zal can control the trap doors to make way for both himself and the Prince. We can see how broken the collision is near the moving platforms in this level. Other than that, nothing much to say about this level.
4-5 I
Zal kidnap level, which starts with a barrier skip. In the second fight we can make use of the latch to kill the last enemy fast. for some reason if I try it on the shield enemy, the game soft locks. Then we are forced to return to 4-3.
4-3 II
This time Zal unlock the power to freeze certain types of corruption, including a new kind of elastic corruption and the corruption dung. It takes about 20 ingame frames to accomplish this. There is also a little phase skip in the fight with Zal, we trick him by getting away from him early. After some ceiling clips, the level converges to the same route as before.
4-5 II
Past the point where Zal was taken away, we have...you guessed it, some contraptions involving the newly gained power. We have one barrier skip and some minor optimisations and level is over.
4-6
In this level we are introduced to the stone-man enemy. The most optimal way to kill him is to take damage from him, otherwise we have do two extra dodges which wastes time. This whole cycle has to be repeated once more to finish him off. The level involves a lot of corrupted air stuff where Prince and Zal go in seperate paths. There are a lot of the usual optimisation but the level is straightforward.
4-7
The theme of this level is using frozen corruption to redirect boulders into door opening buttons. As long as the earliest cycle is made, there is nothing more to be done. There is a barrier skip and then we are introduced to witches, a new type of enemy which takes both Zal and the prince to take down. IMO this level also involves the most satisfying combat with the red enemies. A very long level, so long that they decided to cut one level from this world.
4-8
A long but straightforward level. Done pretty much the intended way with exception of one barrier skip toward the end.
4-9
Another boring boss. He has a ton of health but lets us just deplete half of it in one phase, and the remaining takes 3 more phases. Moving on to world 5.
5-1
So Zal has abandoned us and we are forced to continue the journey alone for a while. The level is pretty linear. At the moving wall, it is impossible to jump off and jump back to make the cycle even though it looks like it, the event to trigger the wall moving has weird properties it feels like. We still manage to barely make it in the first cycle with some airstep shenanigans. At the end, when done from a specific height, we can directly reach the top enemy and finish the level.
5-2
Another short level which has the most unsatisfying cycles at the start in any game ever, I dont know if it was intentional design to make barely impossible cycles in these levels because lorewise the prince is supposed to be a bit bummed out. There is a little ceiling clip later in the level and thats about it.
5-3
Another straightforward level, starts with our old friend longfall grab. I am pretty sure every single soul who played the game would have found out about the glitch at this point because the intended way is actually so unintutive. Great level design and testing. There are also a couple of ceiling clips, and we unite with Zal again at the end of the level. I dont know if it is because we mash quickly but the render during the dialogue is hilariously broken.
5-4
This time Zal has returned with the power to activate portals, and that means some contraptions involving them. There is one part where we do a ceiling clip instead of making portals (which also saves time), I found it hilarious. At the end of the corrupted air segment, we shoot a magic ball towards a gem and switch to the Prince. This deloads everything near and Zal as the Prince is far. The cool thing is that every thing including the magic ball reloads as the Prince nears the area and opens the door. And this leads to the end of the level.
5-5
This level start with one those annoying stonemen. We do our second intential death about at the first checkpoint for two reasons. The less important reason is that we get our health back. I would have tried to work around this if not for the more important reason - for some reason the boulders needed to proceed spawn much slower if we proceed without dying. I actually counted and overall dying actually saves about 100 frames here. By the way, Zal can stop and also control the direction of the rotating platforms which comes in very handy a lot of the time. Rest of the level is straightforward.
5-2 II
We have to collect 4 rubies and for two of those we are forced to go back to the first 2 levels of the world. Great, seems like the game has run out of creatures to abduct Zal to force us replay levels. Atleast this time we can use Zal's powers to catch the cycles this time. At the first checkpoint, we do our third intentional death. And we have just performed the biggest skip in the game. Wait what? One may wonder. The game has put some boulders to force us through a different harder path through the level, but death abuse just despawns them and we can just take the normal path to finish the level.
5-1 II
The side effect of entering 5-2 first is that the boulders which are supposed to block the easy path through the level just stop existing. What an icing on the cake. The level is obviously a repeat, just like that we get our first 2 rubies.
5-7
For anyone wondering, the levels are numbered this way because of the order in which they are unlocked, but we do it in this order to save walking distance in the map. The level starts with another troll cycle, but such is life. We see the flying goblin enemies. These take Zal's magic balls to take down and then its actually really hard to finish them off in one cycle, but if we start hitting them as soon as possible which is when they are airbound, its no problem. A very thematic level, but we finish it off.
5-6
The level starts off normally with some goblin fights, then some portal shenaigans. It introduces the big purple guys who despite having a lot of HP just absolutely melt with the prince's combos. Spoilers - the game is about to ruin it for us. There are a bunch of minor optimisations with the portal "puzzles", but thats about it for this level.
5-8
There is new type of celing clip in this level. Its possible to jump of an edge in an opposite direction and in this case it leads to a ceiling clips thanks to the layout of the room. The rest of this level is just very optimised corruption latch sections and fighting enemies. No boss in this world, we move to world 6.
6-1
Prince and Zal have merged into one being, who I will call 'dark prince'. and now we can eat ourself with elastic corruption and use it as a means of travel. And then comes combat. My God, despite doing 2x damage its so broken to fight as the dark prince. He has this cool combo that just doesnt hit properly when the enemies are at certain distances. So the best way to deal with them is to actually repeat the first hit of the combo. After every hit there is a small chance to be interrupted by the enemy, the best option for us is to just block it at that point. If the enemy has only one HP left though, its possible to do the second hit of the combo before he hits us and that will finish him faster. The enemies in this level were extra cocky and I had to block most of them once. Its actually painful how close it is to being a barrier skip, that would have saved so much time. And then come the moving platforms. The prince can randomly decide to jump off them sometimes, I am not even kidding. But there is some manipulation to avoid it and its not too bad. And thats basically the level.
6-2
This level is more of the same thing. There is a little more platforming in this level I would say, and the health management is a bit tight. I got surprisingly good RNG here and didnt have to block for a lot of enemies.
6-3
The final boss as every other boss has 4 scripted phases. He is actually much better than the normal enemies, once he is stunned he takes the 8 hits nicely without blocking or anything. In the last phase we are supposed to tie him down with the elastic corruption but if we are close enough its not even necessary and just like that he is killed, the kingdom is free.
Q.E.D.
Like I already said, I had a blast working on this. It made me appreciate this game more as I was forced to look at the little details it contains for being a mere spin-off. I have never casually played this game and hence didn't know the lore at all lol, but while frame advancing through the dialouges I thought it was a good idea to read it and I found it actually pretty interesting. There is definitely potential for improvement, the experience I gained and the technique I developed while making this will obviously help if I do a second round, but I will wait until a bigger skip is found. The ceiling clip I found and used in 5-8 was actually a new one that I found while making the TAS. So far I haven't found any big application of it in Worlds 1 and 2 but admittedly I have not looked at it extremely rigorously and there are 2 more worlds to test it on, so we will see.
Suggested Screenshots:
feos: Claiming for judging.
feos: While
the NoIntro database considers this a bad dump, the good dump doesn't run on desmume, and we don't know if there are gameplay differences (the dump info says
[Underdumped header][Bad Secure Area]
). So this run is fine.
The video commentary helped immensely with understanding what's going on, thanks for making it!
The run itself looks really good, accepting.