Attempting a speedrun!

Home Forums Previous Months 18 – July 2018: Prince of Persia Attempting a speedrun!

Viewing 7 posts - 1 through 7 (of 7 total)

  • DavidN
    Participant
    Podcaster
    #1587

    My aim this month is to learn how to record my first tool-assisted speedrun with Prince of Persia. I’ve quickly learned that trying to do a DOS game as a first TAS is regarded as jumping into the deep end due to the amount of setup required and the lack of real documentation.

    To sum up what I’ve learned so far… the emulator of the moment for recording DOS TAS runs is JPCRR, a slow DOS emulator written in Java. It’s much slower than DOSBox, but this doesn’t matter in a TAS context because you’re stepping through frame by frame anyway (I’m going to get repetitive strain injury hitting the Frame Advance button). This emulator records your keydowns, keyups, etc on a frame-by-frame basis and can intelligently overwrite them if you jump back to a previously saved position, forming a continuous string of inputs (which, confusingly, is called a “movie” even though it’s a text file that looks like:)

    +385196148 org.jpc.emulator.peripheral.Keyboard KEYEDGE 54
    +306396936 org.jpc.emulator.peripheral.Keyboard KEYEDGE 39
    +224931084 org.jpc.emulator.peripheral.Keyboard KEYEDGE 28
    +362063046 org.jpc.emulator.peripheral.Keyboard KEYEDGE 54
    +211731216 org.jpc.emulator.peripheral.Keyboard KEYEDGE 39
    +268397316 org.jpc.emulator.peripheral.Keyboard KEYEDGE 46
    +298997010 org.jpc.emulator.peripheral.Keyboard KEYEDGE 28

    Once the movie (list of inputs) is stitched together, you then run the emulator and play that list of inputs back to it while recording, forming the actual video file for the output of the speedrun.

    All that said, eventually I was able to fumble my way through the various tutorials enough to produce this. This is a significant milestone because it means I now know how to get the game running on JPCRR, send instructions to it and manipulate the game by rewinding to a save state (and not insignificantly, how to get a video out of it afterwards). Though the Prince won’t be too pleased with the actual progress in the game.

    https://www.youtube.com/watch?v=9uhxvbgGMIY


    Mgoddard
    Participant
    Podcaster
    #1594

    This is really informative and interesting background on the tool. Looking forward to seeing how you progress in your speedrun!


    DavidN
    Participant
    Podcaster
    #1595

    From my initial exploration into the TAS community, they seem very friendly and willing to support newcomers 🙂 I got some great advice from slamo in this thread that helped speed up my workflow: http://tasvideos.org/forum/viewtopic.php?t=20296

    And with that, I’ve been able to complete levels 4 to 6 in two minutes flat. (You can use Shift+L at the title screen to enter a practice mode that can bump you up to level 4, but sets your timer to just fifteen minutes – this is supposed to make the game impossible to complete, but I think otherwise! I’m counting this as a legitimate way provided by the game to “complete” levels 1-3 instantly 😉 )

    https://www.youtube.com/watch?v=rmEM5-43_Ek

    It’s odd instructing a computer how to play a game rather than directly doing it yourself – you lose a lot of the feel of the controls and timing, so I was surprised that some parts actually felt more difficult than they would have been if I were doing a human speedrun through levels that I’d memorized years ago. But having the ability to save a state and restart definitely let me try some guard-skipping tricks that I wouldn’t have risked if I were doing it manually.

    Level 4

    – At the start, there’s a guard on the other side of the portcullis to the right who usually just turns around to face you if you venture on to that screen. But by moving into the screen in a specific way, you momentarily convince him you’re close enough to be worth pursuing, and he obligingly steps forward on to the tile to let you in. This lets you avoid going along the real route to the left, down and up again.

    – Having done that, you then rudely teleport past him! By jumping forwards when you’re a very specific distance from the guard, you can avoid his swing and dodge past him. Then, once you’ve bopped him once, you have a window to turn and run.

    – Jumping forwards is significantly faster than walking. I’m almost sure I could have fit in one more jump on my way to the right, but the presence of the pit and the spikes mess the rhythm up a bit.

    – As I go back to the left after opening the exit, you see a “Sound off” message (which is really turning off the music, not the sound). Disabling the sound saves a few seconds at the end of each level, because otherwise the game’s theme plays and the timer is still running!

    Level 5

    – No jumping when going to the right at the start, because it would make the Prince too quick and he’d hit his head on the portcullis.

    – Tempting the guard down from his platform lets you take advantage of a bug. By coaxing him over to the left and entering combat, you can back on to the screen to the left and the game will think you’re beyond the portcullis. Otherwise you’d have to get here by going up and over, fighting another guard.

    – Then a run to the left, alternating between fighting and jumping. The guard skipping trick doesn’t work when you’re facing left – you have to stop, draw your sword and then swap positions before making your escape.

    Level 6

    – The spikes are arranged really awkwardly here, very hostile to continuous running and jumping!

    – The midboss of the game, affectionately known as Fatty, is anticlimactically skipped in the same way as any other guard!

    – You’re meant to attempt to jump over to the Shadow and try to climb up only for him to close the door on you, but the level ends as soon as you leave the bottom of the screen so you can just do it yourself 🙂

    The next phase will be levels 7-9, which are much longer and involve more fights with guards, so those will be more difficult – oddly, the game’s levels get much easier again on 10 and 11. Wish me luck 🙂


    DavidN
    Participant
    Podcaster
    #1613

    So I said the next phase was levels 7-9, but I went ahead and finished the whole thing – after you’ve got through those, levels 10-12 are nothing! I finished the game in 12:20.58, counting from the moment the “Level 1” text appears on the screen to the cut to black after completing level 12c. For comparison’s sake, my best human time for the game is 14:24.32, over two minutes slower – an eternity in speedrunning terms! And I’m sure that there’s more that I can go back and enhance (not to mention the emulator was a bit choppy at some points as well, not helping the final time).

    Here’s the final rendered TAS from the DOS emulator, and I’ll do a version with commentary soon.

    (WARNING, the video begins with quite a loud and alarming emulated PC speaker beep)

    https://youtu.be/vIjM2Sy7pOo


    dr_st
    Participant
    #1614

    Thank you for doing this! It was very entertaining to watch. I must try to trigger some of these bugs that allow skipping portions of levels. 🙂


    DavidN
    Participant
    Podcaster
    #1624

    Thanks! I had a bit of illness just after posting that video, but here at last is the commentary as to what I’m doing and how I’m skipping pieces of the levels… I had to talk faster than I had anticipated.

    https://www.youtube.com/watch?v=hfOocUkxJ08


    sorceress
    Participant
    #1625

    super cool 😀

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.

Home Forums Previous Months 18 – July 2018: Prince of Persia Attempting a speedrun!