Tool-assisted game movies
When human skills are just not enough

Submission #7116: eien86's DOS Prince of Persia in 12:59.65

Console: DOS
Game name: Prince of Persia
Game version: any v1.0
ROM filename:
Emulator: JPC-RR r11.8 rc2
Movie length: 12:59.65
FrameCount: 46779
Re-record count: 227
Author's real name: Sergio Martin
Author's nickname: eien86
Submitter: eien86
Submitted at: 2021-05-05 11:45:42
Text last edited at: 2021-05-05 19:37:07
Text last edited by: eien86
Download: Download (16360 bytes)
Status: decision: cancelled
Submission instructions
Discuss this submission (also rating / voting)
List all submissions by this submitter
List pages on this site that refer to this submission
View submission text history
Back to the submission list
Author's comments and explanations:
[TAS] Prince of Persia (DOS, 1990) any% by eien86 in 12:09.333

Encode: https://www.youtube.com/watch?v=jIEG42RMt_I

In this timeless classic, the tyrant Jaffar has seized power and has forced Sultan's daughter to marry him. You, the brave youth who is a prisoner in Jaffar's dungeons must rescue her within 60 minutes. Little does poor Jaffar know that he will be defeated in a fifth of the intended time.

- Total IGT: 12m 09s 333ms

- Level Skip IGT: 08m 58s (Estimated)

- Total RT: 12m 59s 666ms

Game objectives

The objective of the game is to beat all 14 levels in less than 60 minutes (IGT). In the "any%" category, all tricks and glitches are allowed except for the use of cheats. This category requires that all levels are completed (without skipping the first three levels using the SHIFT+L code).

This movie makes the best effort to reduce the real time to solution. However, it is the IGT the one used as the metric for speed, as it omits cutscenes and account for changes in framerate (the game operates in 12 FPS normally, but 10 FPS during combat). The IGT starts immediately on Level 1 and stops as soon as Jaffar dies in Level 13, as this is the time taken for the high-score board. Level 14 is only accounted for in RT, hence the difference between both times.

A potential level Skip run IGT can be obtained by subtracting the time for the first 3 levels. In this case, it results in an estimate of 08:58m which a notable improvement compared to 12:20.58 of the previous level-skip TAS produced by David Newton (https://www.youtube.com/watch?v=hfOocUkxJ08).

In general, this run abides by the same rules as the RTA runs (https://www.speedrun.com/pop1). Only difference is that we use the Prince of Persia 1.0 version as emulation for newer versions does not handle sounds well. Here some guard reaction times and probabilities are changed, but overall the gameplay is the same.


This movie is the result of decades of routing and discoveries, and has been developed with extensive help from the current speedrunner community. Notable contributors to the routing are the actual game top speedrunners, such as (in no particular order) crem, CapnClever, 7eraser7, Karlgamer, YOLO4GG, GoodSpectre, Higlak, Velcheran, Creditor, WinterThunder, uvq3tsa, Wolfadawn, KenshinTrek, and GMP.

The route has improved a great deal during the last few years thanks to the use of savestate-enabled emulators (e.g., DosBox-X), allowing players to try different tricks without losing too much time. The development of this TAS is largely based on the existing route but has introduced two novel approaches:

- Frame by Frame Analysis / Memory Debugging

Thanks to the use of emulators (JPC-RR) and memory debuggers (Cheat Engine), the discovery new tricks (e.g., level 7 and 8 skips -- https://www.youtube.com/watch?v=EtFVLF5kuds, https://www.youtube.com/watch?v=MlBbu612T1o) that would have not been otherwise possible, as their discovery required a frame-perfect input and RNG-heavy setups. Fortunately, more human-friendly versions of these skips have been developed after their discovery.

- Routing by Exhaustive Seach

The development of an open-source version of the game (SDLPop, https://github.com/NagyD/SDLPoP/) allowed the development of a high-performance parallel breadth-first search bot, called Jaffar (https://github.com/SergioMartin86/jaffar) that exhaustively explores all possible movements in each possible frame. The search is made possible by constraining the exploration space to that of a pre-determined route, requiring a few trillion states per level. As a result, the bot found the most efficient way to traverse the community-established route. We've applied Jaffar repeatedly on a supercomputer to solve for every level. Following strict definitions, the re-Record count is: 836,877,925,474.

Stage by stage comments

Level 1:

The route for this level has been proven to be optimal by the bot on sheer brute force. The strat includes bunny hopping at the beginning for a quick fall and then skip the guard via a timed jump.

Level 2:

A long level. No changes to the route here compared to RTA, but a lot of RNG optimization by the bot to skip all guards faster.

Level 3:

The bot-optimized movement here played a big role in shaving those last few frames. Movement, especially while ascending/descending the way to the exit door open tile has been highly optimized. An RNG-induced hit by the skeleton saves a few backward steps with the sword.

Level 4:

Here a few known skips are used, most notably using the guard to open the first door. The bot's contribution is minimal here, optimizing a few movements before/after the mirror.

Level 5:

Here the door skip is employed to skip a big part of the level. This is performed by luring the guard to the left and then clipping through the door while on-guard. The rest of the level includes the normal route, optimized via the bot.

Level 6:

Here we used the normal route. A nice jump over the hole in the second-to-last screen was found by the bot

Level 7:

Perhaps the most broken of all levels, we employed the newly discovered level 7 skip which contains a whole array of glitches all working in unison. First, we 'moonwalk' the guard through the chomper, then we make him fall 2 stories without dying by exiting and reentering the room. Then we use the guard to perform a 'Yolo skip' through the door. This route was exhaustively optimized by the bot.

Level 8:

Another spectacularly broken level. We lure the guard towards the 'useless' bad potion room and use him to make us clip through the wall and the floor towards the end of the level. This marks the return of the mouse who comes to save the day.

Level 9:

Definitely the longest and hardest to crack level. Here, the only skip found was the damage clip through the last door that allows us to skip making the loose tile fall, saving a few seconds. Other than that, it is still ripe for skips. Here the movements were highly optimized by the bot.

Level 10:

Here we make use of a few tricks, including 'guard jump', 'overflow teleport', 'yolo skip', 'fall damage cancel', and RNG manip. It would be very hard to improve level 10 any further.

Level 11:

This level remains skipless, mainly because of it's layout (all horizontal) it is still hard to crack. However, all moments were optimized by the bot, shaving many frames in the way.

Level 12:

An climbing level, here we use the 'overflow teleport' trick to skip to the shadow screen. Here, we grab the sword and immediately merge with the shadow to exit the level.

Level 13:

Here we used the bot to manipulate RNG to guarantee a fast Jaffar kill. As soon as Jaffar dies, the IGT clock stops.

Level 14:

This level only requires running a few screens, and IGT does not count anymore.

Other comments

This TAS is 28 seconds faster than the current RTA WR, and 10 seconds faster than the sum of human best segments. This speaks to the incredible skills of the RTA runners, who have incorporated most of these seemingly TAS-only tricks into their runs succesfully.

A few more seconds could be gain for this TAS through the following:

- Improvements to Jaffar's memory management can allow for 10-100x wider searches, and perhaps discover new unknown skips.

- Many ideas for skips on later levels are still under research.

- A more robust RNG manipulation throughout the game (not only per-level).

Emulation Issues:

- Sound Blaster emulation seems to cause jittering in this emulator and game version. This is the best setup we've found, as the only other option is using PC Speaker emulation which, besides sounding horrible and ruining the entertainment factor, it affects the way RNG operates and thus also that of the gameplay.

Nach: Judging.

Similar submissions (by title and categories where applicable):