Post subject: First TAS, learning JPC-RR (Prince of Persia)
Joined: 7/4/2018
Posts: 3
Hi, TAS community! DosGameClub[.com] is looking at the original Prince of Persia this month - I've been vaguely interested in speedrunning for a while, but have decided to take the chance to record one myself for the first time. I've read around the instructions on JPC-RR and have got some great hints from DungeonFacts' thread on Crystal Caves and c-square's advice. I've been able to get the game up and running in the mouse-JPC-RR fork and have even recorded a brief test video which involved loading saved states and re-recording: https://www.youtube.com/watch?v=9uhxvbgGMIY The way I understand it - is this all correct? - A "movie" in TAS terms is not a video file like it sounds, but a list of recorded keyups/keydowns/etc that you piece together using a TAS-appropriate emulator. - The emulator records these key inputs as you play or step through the game, and you can "rewind" to a previously saved state at any time and re-record from there. - To get the final TAS, you set the emulator going and play back the movie (i.e. set of keypresses), dumping the screen output to disk to eventually transform into a video file. So I think I'm on my way, though there are a couple of things I'm unsure about: - Can you alter the amount of time in ticks/ms that pressing F will skip forward? Prince of Persia runs at ~12fps, and hitting F five times per frame is beginning to give me RSI :) - Giving input to the game as I step through seems to be a rather cumbersome process of switching focus to the onscreen keyboard, pressing the key down, making sure the emulator window is focused again and hitting F to advance. Is there a faster way - perhaps by sending a frame-advance signal to the emulator without the window having to be focused? - Is there a way to step backwards or do I have to just be more careful about when I choose to save state? :) Thanks for any and all advice!
Post subject: Re: First TAS, learning JPC-RR (Prince of Persia)
Reviewer, Expert player (2393)
Joined: 5/21/2013
Posts: 414
DavidN wrote:
The way I understand it - is this all correct? - A "movie" in TAS terms is not a video file like it sounds, but a list of recorded keyups/keydowns/etc that you piece together using a TAS-appropriate emulator. - The emulator records these key inputs as you play or step through the game, and you can "rewind" to a previously saved state at any time and re-record from there. - To get the final TAS, you set the emulator going and play back the movie (i.e. set of keypresses), dumping the screen output to disk to eventually transform into a video file.
This is the right general idea.
So I think I'm on my way, though there are a couple of things I'm unsure about: - Can you alter the amount of time in ticks/ms that pressing F will skip forward? Prince of Persia runs at ~12fps, and hitting F five times per frame is beginning to give me RSI :) - Giving input to the game as I step through seems to be a rather cumbersome process of switching focus to the onscreen keyboard, pressing the key down, making sure the emulator window is focused again and hitting F to advance. Is there a faster way - perhaps by sending a frame-advance signal to the emulator without the window having to be focused?
Both of these can be solved by customizing the menu. If you look in the datafiles folder you'll see a file just called "extramenu". This is a list of commands you can customize in the "Extra" dropdown menu in JPC-rr. You'll notice there are already some hotkeys to toggle certain keys so you don't have to go back to the keyboard window, and you can add some more if you want by using the same format as the other hotkeys (list of key numbers is here: http://tasvideos.org/EmulatorResources/JPC/KeyNumbers.html ). You can also customize a hotkey to advance the emulator by a certain amount of time. Copy the format of "Run 0.2s" and just change the hotkey and value after "trap-timed" to whatever you want (the time is in nanoseconds).
- Is there a way to step backwards or do I have to just be more careful about when I choose to save state? :)
You can't step backwards, but you can make snapshots that you can run the movie from instead of just playing the whole movie back. The way I do this is I save a snapshot, advance a frame, and then overwrite all of my hotkeyed savestates after that. From there you can TAS normally, and if you want to play back everything after the snapshot you made, load it with the option "Snapshot (preserve events)". You have to be careful about doing this, because the rest of the TAS must derive from that snapshot if you want to play it back from there, but if you use my method you shouldn't have any problems. Good luck, and there are plenty of us to help you out with this difficult emulator, so just let us know if you have any more questions.
Joined: 7/4/2018
Posts: 3
Aha, thank you so much - I can't believe it didn't occur to me to just press the cursor keys :) I think I was thrown by having no reaction from the onscreen keyboard until advancing to the next frame, and the way that the keys act like a toggle instead of keyup/keydown on press and release. And those pieces of advice really sped me up to the point where I was able to piece together a complete run of the fourth level. (At the beginning I use Shift+L which enters a practice mode up to level 4 and reduces your timer to 15 minutes - it's intended to make the game impossible to complete.) https://www.youtube.com/watch?v=Tvm1CRAj_IM It's odd instructing a computer on 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. But it definitely let me try some guard-skipping tricks that I wouldn't have risked if I were doing it manually.
Active player (372)
Joined: 9/25/2011
Posts: 652
DavidN wrote:
And those pieces of advice really sped me up to the point where I was able to piece together a complete run of the fourth level. (At the beginning I use Shift+L which enters a practice mode up to level 4 and reduces your timer to 15 minutes - it's intended to make the game impossible to complete.) https://www.youtube.com/watch?v=Tvm1CRAj_IM
Welcome to the world of Dos TASsing, DavidN! Nice level. Looks like you've caught on very quickly. Yes, JPC-rr can be very clunky to use, but it's decent once you get the hang of things. There are lots of us here that are happy to help, so be sure to reach out if you ever run into any difficulties. Happy TASsing.
Joined: 7/4/2018
Posts: 3
Just wanted to come back and say that I eventually finished this! Final time for Prince of Persia DOS is 12:20.58 measured from the first frame of the game to exiting the final room (here, I'm counting a documented feature that allows you to skip to level 4 in "practice mode" as a legitimate part of the game). https://www.youtube.com/watch?v=vIjM2Sy7pOo - Raw output https://www.youtube.com/watch?v=hfOocUkxJ08 - With breathless commentary Thanks for everyone's pointers - I'm already seeing bits of the video that could be done better for a second version...
Site Admin, Skilled player (1236)
Joined: 4/17/2010
Posts: 11268
Location: RU
DavidN wrote:
https://www.youtube.com/watch?v=hfOocUkxJ08 - With breathless commentary
Oh wow, the commentary is so intense that I had to take breaks! Awesome job otherwise!
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Active player (372)
Joined: 9/25/2011
Posts: 652
Very nice, yes vot... oh wait, this isn't submitted yet. Well, looking forward to voting yes. Congrats on your first TAS! You did a great job. :)