Post subject: Mission Critical
Joined: 8/18/2020
Posts: 7
Mission Critical was a 1995 DOS puzzle game, with gameplay similar to Myst, but with a sci-fi setting. It has a special place in my heart, since I played it sitting on my father's lap. Two years ago I wrote a tool to TAS it and then I kinda forgot about it. My TAS isn't a traditional frame based TAS, since I didn't know that frame tools existed for DOS. It waits a fixed number of milliseconds between different types of actions (usually between 20 and 100) and has the ability to pause waiting for the screen to match a picture taking during recording. These images can also have sections that are ignored (there's some animations that won't match between runs). It also has control over the mouse. Recording for it isn't the most elegant, since you have to move the mouse using the keyboard, but can take the images it needs to match against later. It's set to run against the GOG game version, since it doesn't have disc swapping. It also requires a special set of mappings from keyboard to DOSbox, but that can be done away with if needed. The mappings are because I needed controls for the TAS, and they conflicted with the controls for the game. https://github.com/Raptoer/HypeTas is the repository, and includes the input files (.dat files) and the image files it uses. https://www.youtube.com/watch?v=8Muz4attuQE is an example video running with the tool showing what it's doing in the background. https://www.youtube.com/watch?v=aqZBM5Dxd3w is currently my best run, at 5:48.50. https://www.youtube.com/watch?v=BbSNQHGxSbM is a bit of a commentary on it as it runs. This one will especially spoil the game, and it's a darn good game. Sadly it doesn't use any TAS only tricks, nor any glitches. It just plays it very quick. For improvement I see a few possible areas 1) Technical improvements to the tool, making the screen checking faster. Currently it takes 17ms to take the image from the game and compare it to the reference image. It checks ~1300 images, so each ms removed could be ~20 seconds off the time. 2) Make the timings tighter. There's fixed timings in a number of places. This increases the chances of the game not registering an input. These add up to about 45 seconds total. 3) Routing improvements. I can't think of any way to do any part faster, or else I would have done it. I've tried sequence breaking in a few places, only for the game to be too smart for that. 4) Random chance. For the combat section there's a bit of RNG that I don't really control. 5) Figuring out how to remove the 2 inexplicable pauses (see commentary) 6) Removing image checks. I think there's places that I use image checks that are unnecessary. Removing these could cause a minor speed up. Let me know what you guys think! Thanks, Pooter
Joined: 8/18/2020
Posts: 7
Turns out, if you turn off sound, the game plays significantly faster. Between that and speeding up timings around the bomb, arming the drones, and a few other small places. This results in a 4:58.150 world record. I could probably cut it down a few more seconds, but will be in a few days. https://www.youtube.com/watch?v=UkwTuL4IETg
Sand
He/Him
Player (125)
Joined: 6/26/2018
Posts: 154
Pooter wrote:
This results in a 4:58.150 world record. I could probably cut it down a few more seconds, but will be in a few days. https://www.youtube.com/watch?v=UkwTuL4IETg
I watched this encode, good work. It has a real feeling of speed. I'm always intrigued by the TASes that are run by a predefined script, rather than being worked through fully interactively. I wonder if it's possible to convert your TAS tool's output stream of events into TASScript so that it can be played back in JPC-RR. TASScript has been used in TASes of other DOS adventure games, like Quest for Glory II and The Hitchhiker's Guide to the Galaxy. There are probably timing differences relative to DOSBox, but it's possible that the game is tolerant enough to make inputs portable across emulators.
Joined: 8/18/2020
Posts: 7
The problem with that is rng. There's 3 points where I have to account for some randomness in the game. At several points I'm watching the screen waiting for the result of the combat to be over. I don't know exactly when it would happen, but instead I'm reacting to it happening. There's also a place where I don't know the exact location of an item on the screen, there's a special command that searches the screen for the target in order to click on it. Finally at the bomb part I wait until the bomb goes off, which depends on how long the earlier parts of the run took. If I was able to deal with the rng then it could be done.
DrD2k9
He/Him
Editor, Judge, Expert player (2056)
Joined: 8/21/2016
Posts: 1011
Location: US
Something else to consider with TASing a DOS game for TASvideos.org is that some DOS games need to be run at native CPU speeds in order to be eligible for publication. Here is the pertinent rule. In the youtube video linked above, DOSBox is set to Maximum 100% cycles for CPU speed. This means that the emulated CPU may be running faster than a CPU that was actually available at the time of the game's release. This could potentially be allowing for faster movement/actions in-game than could have been done on a proper era CPU. All that said, it's possible that a JPC-rr TAS could match or even be faster than the video posted. Primarily, the RNG would be knowable and the inputs could be planned in order to eliminate any time loss from unknown RNG events. Also, it may be possible to manipulate the RNG; either through altered input or possibly by altering the emulated real time clock settings (as has been done in other DOS games published here). Further, JPC-rr (with TAScript) allows for sub-millisecond precision with inputs, which may provide opportunity for an even faster run. Sadly, I don't know of a way to convert what you have to a JPC-rr movie/input file. To TAS this game in a way that would be publishable using JPC-rr would likely require a complete redo.
CoolHandMike
He/Him
Editor, Reviewer, Experienced player (635)
Joined: 3/9/2019
Posts: 580
Pooter wrote:
Turns out, if you turn off sound, the game plays significantly faster. Between that and speeding up timings around the bomb, arming the drones, and a few other small places. This results in a 4:58.150 world record. I could probably cut it down a few more seconds, but will be in a few days. https://www.youtube.com/watch?v=UkwTuL4IETg
Hello. DOS runs are pretty rare so started reading. One thing you may want to consider is to ask a judge about whether to have the sound on or off. If you intend on tasing it that is.
discord: CoolHandMike#0352
Joined: 8/18/2020
Posts: 7
CoolHandMike wrote:
Pooter wrote:
Turns out, if you turn off sound, the game plays significantly faster. Between that and speeding up timings around the bomb, arming the drones, and a few other small places. This results in a 4:58.150 world record. I could probably cut it down a few more seconds, but will be in a few days. https://www.youtube.com/watch?v=UkwTuL4IETg
Hello. DOS runs are pretty rare so started reading. One thing you may want to consider is to ask a judge about whether to have the sound on or off. If you intend on tasing it that is.
I did it with an ingame option rather than a dosbox config, I would generally consider that to be allowable just like lowering the graphics settings in a windows game.
Joined: 8/18/2020
Posts: 7
DrD2k9 wrote:
Something else to consider with TASing a DOS game for TASvideos.org is that some DOS games need to be run at native CPU speeds in order to be eligible for publication. Here is the pertinent rule. In the youtube video linked above, DOSBox is set to Maximum 100% cycles for CPU speed. This means that the emulated CPU may be running faster than a CPU that was actually available at the time of the game's release. This could potentially be allowing for faster movement/actions in-game than could have been done on a proper era CPU. All that said, it's possible that a JPC-rr TAS could match or even be faster than the video posted. Primarily, the RNG would be knowable and the inputs could be planned in order to eliminate any time loss from unknown RNG events. Also, it may be possible to manipulate the RNG; either through altered input or possibly by altering the emulated real time clock settings (as has been done in other DOS games published here). Further, JPC-rr (with TAScript) allows for sub-millisecond precision with inputs, which may provide opportunity for an even faster run. Sadly, I don't know of a way to convert what you have to a JPC-rr movie/input file. To TAS this game in a way that would be publishable using JPC-rr would likely require a complete redo.
I don't see a frequency divider in dosbox, and even if I did, since I'm not currently competing against anyone I'm only really interested in getting the absolute number lower. I was mostly interested in the technical aspects of making the TAS. Just recording one using someone else's program didn't really interest me much. Even now most of what I'm doing to cut down on time is improvements to the software rather than the script. I suppose I could argue that I'm actually TASing the GoG version of the game that comes from the publisher on Dosbox instead of the original game.
Sand
He/Him
Player (125)
Joined: 6/26/2018
Posts: 154
Pooter wrote:
I don't see a frequency divider in dosbox, and even if I did, since I'm not currently competing against anyone I'm only really interested in getting the absolute number lower. I was mostly interested in the technical aspects of making the TAS. Just recording one using someone else's program didn't really interest me much. Even now most of what I'm doing to cut down on time is improvements to the software rather than the script.
It's not a problem. What you've produced is already a completely valid tool-assisted speedrun. I mention JPC-RR because that's the standard emulator used for TASes of PC games at TASVideos.org. You only need to look into that if you have interest in a TASVideos.org publication. You don't need to do that if you don't want to; you can always just let your movie stand on its own. I think the approach you've taken is interesting. Good work!
Pooter wrote:
CoolHandMike wrote:
Hello. DOS runs are pretty rare so started reading. One thing you may want to consider is to ask a judge about whether to have the sound on or off. If you intend on tasing it that is.
I did it with an ingame option rather than a dosbox config, I would generally consider that to be allowable just like lowering the graphics settings in a windows game.
I think what CoolHandMike is getting at is that the choice of whether to leave the music enabled could be considered a tradeoff between speed and entertainment. Some people prefer watching runs with all features enabled, even if somewhat slower. If you do decide to convert the TAS into JPC-RR format, you could ask for feedback on this point before getting started, because the choice will be hard to change later. If you already have a strong opinion one way or the other, go ahead and follow your vision.