Introduction
After
fooling the residents of Spielburg into thinking he had done something useful, TAS journeys to the desert city of Shapeir. Little does he know that he is caught up in the grips of a dark prophesy. Soon the elements of Fire, Air, Earth and Water will descend upon the city, and he will be challenged with stopping the rise of Ibis, bringer of the "Night Eternal". Will TAS rise to the challenge? Will he finally do something heroic? Is no frame safe from his mission to accomplish as little as possible? Find out in
Quest For Glory II: Trial By Fire
Encodes
There are two encodes. The first one cuts out two long and boring waits in Raseir. Probably the one to watch unless you're really interested in details of the screen transition time nudges.
The second is the full encode, for those who want to manage the waits themselves (or just watch them).
Also, I've added a HUD to each to show what's going on with the game clock, where it's important.
Game objectives
- To become a Hero! (again)
- Plays on Hardest Difficulty
- Aims for fastest time
- Contains Speed/Entertainment Trade-offs
- Emulator used: JPC-rr 11.2 (Modified for added mouse support)
- Game Version 1.102
Emulator Choice
Back in 2011 when I did my
Space Quest 4 TAS, I updated JPC-rr 11.2 to allow for better mouse support, which is essential for doing a point-and-click speedrun. JPC-rr has since been updated to version 11.7, and although I tried to add my upgrades to the newest version, I haven't been able to get even the initial download to compile. So, since movies created with my version so far have had no problems running in the latest version, I stuck with my modified 11.2 version for this run.
(If you're considering doing a mouse-based DOS TAS and would like a copy, shoot me a message on the side)
Challenges and Opportunities
Text Entry
The game polls the keyboard buffer once every 7 frames (0.1 seconds). That means it can take an excruciatingly long time (in TAS terms) to type out anything, and it is vital that the least possible typing be done. For example, having the hero run instead of walk is only worth it if you can save more than the 28 frames it takes to type "RUN<Enter>". Similarly, finding the shortest way of entering commands is vital: "Hop" instead of "Jump", "Get Item" instead of "Get Equipment", and finding opportunities to just use the letter 'Y' to answer people's questions. Furthermore, it is usually faster to use the mouse over the keyboard for movement and cancelling text boxes, but not always.
Desyncs
I have found JPC-rr horrible for being able to splice in changes after the fact. Because "frames" are not hard-set like on consoles, making a change causes many desyncs down the line. Therefore, it is imperative to make sure every screen is fully optimized before moving on to the next. To help, I tweaked JPC-rr to allow for unlimited save slots by being able to change the save directory. In making the run I used 1,029 different save slots.
SCI Companion
Practically all the new tricks debuting in this TAS were found because I was able to decompile the source code using
SCI Companion. It is an amazing tool giving almost full access to the source code, resources and other material. The SCI language defintely takes some getting used to, and not having the original variable and method names means there's a lot of detective work needed, however after spending a lot of time with it, I can't imagine doing another Sierra run without it.
The Calm Before the Storms
Arriving in the city, TAS decides to do a little souvenir shopping. Not having any local currency on him, he tricks some weird man into buying his razor clippings from that morning. After haggling for a shiny lamp and buying a map, our hero is worn out, and returns to the inn to sleep.
The "Sell Beard" glitch is well known, allowing you to sell an item you don't have to get 15 Dinar. You can keep doing it indefinitely, allowing for free money whenever you need it. In this run, there were two routes that could be taken:
- Selling one beard means you have to haggle for the lamp and then buy the map.
- Selling two beards means you can buy both the lamp and the map.
In the end, the time it takes to sell the second beard is very slightly less than the 21 additional frames it takes to type the extra three letters required for "Haggle". So, I had planned to take Route #2. Unfortunately, taking Route #2 causes a fragmentation error in the game. This error is not fatal and fixes itself, however the game posts a joke message on the screen which requires you to hit <Enter> to clear. Turns out, that one additional key press makes the difference and causes Route #2 to be longer than Route #1. So I finally chose Route #1, a decision that I would end up very much regretting (more on that later).
I only need to buy two items in this run: The lamp, which is required to get through the Forbidden City, and the map. The map is a great way to kill time in the game. Whenever you use it, the game calculates the distance between you and your destination and increments the game clock by that amount. The map also has a nice secondary benefit... (see below) ;)
Attack of the Fire, Air, Earth and Water Elementals
All that shopping completely exhausted our poor hero, and he heads to bed to recover. After sleeping for five days, he finally gets up and decides to head out and check out the nightlif- OMG! It's a FIRE ELEMENTAL!! Who left that here?!?
After fleeing to the alley, TAS searches the city for help, just to find everything closed. Realizing that the inn is the only safe place in the city, he returns AHHHH! It's still here! RUN!
to the inn and cowers in his room for for a whole week.
Mustering up the courage to finally step outside again, he discovers that someone else has dealt with the fire elemental, however there is still nothing interesting happening in the city. TAS starts to think the city is overrated when one night: EEK! It's an AIR ELEMENTAL!! That's it, I'm getting out of this crazy city!
Running in terror, our "hero" decides to escape the city under cover of darkness...
The game is split into two sections: The city of Shapeir and the city of Raseir. The caravan between the two departs on day 17, so it is imperative to get to day 17 as fast as possible. In the way of that goal stand four elementals:
Elemental | Day it Appears | Method to Defeat it | Destroys the City if Not Defeated by | Threat Level # |
---|
Fire | Day 5 | Luring it into an alley with incense and splashing it with water | Day 7 | 1 |
Air | Day 8 | Anchoring it with dirt and capturing it with the bellows | Day 11 | 3 |
Earth | Day 12 | Attacking it with fire | Day 14 | 5 |
Water | Day 14 | Attacking it with the Air Elemental | Day 16 | 7 |
Behind the scenes, the game code tracks the threat level in a variable. You'll notice that each elemental has its own threat level number, and they are all odd. Odd numbers mean the city is under attack. Even numbers mean the city is at peace.
The game starts with the threat level at zero. On day 5 it increments the threat level to one, triggering the Fire Elmental attack. When you defeat an elemental, it increments the threat level again, so defeating the Fire Elemental moves the threat level to two, returning the city to peace. On day 8, the threat level is incremented to three, starting the Air Elemental attack, and it is incremented again to four when the elemental is defeated. The pattern continues for the Earth and Water elementals.
At midnight on days 7, 11, 14 and 16, the game checks the threat level. If it is even, the city is at peace and the game can continue. If the threat level is odd, the city succumbs to the elemental's attack and the game ends. However, I discovered that if you use the map to travel, and your travel takes you over midnight, the code to take you to your destination overrides the code called to end the game!! Thus, we can just use the map to skip defeating any elementals at all!
A further benefit is the effect this has on the threat level. On day 5, the threat level is raised to 1, cue: Fire Elemental. But since we don't defeat the Fire Elemental, the threat level is still 1 on day 8, when it gets incremented to 2! That means that days 8 - 11 are now spent at peace with no attack. Day 12 increments the threat level to 3, starting the Air Elemental attack, meaning we have to skip the Day 14 Game Over check. Unfortunately, due to the way the code is set up, the threat level remains at 3, requiring another skip of the Day 16 Game Over check.
Now all the Game Over checks are passed, there is nothing stopping us from hitting Day 17 and the caravan to Raseir. Although it is easiest and fastest to just sleep to Day 17 from here, if you do so the game makes you sit through a long cutscene of you watching the sun rise. This cutscene can be skipped by just leaving the city anytime after midnight on Day 17, so another round of map hops gets us to where we can simply march out of the city. There is a small speed/entertainment trade off to be able to show that the Air Elemental is still trashing the city when we leave. This costs approximately one second over the optimal map hops.
If you want to see what's really going on in the encode, I suggest slowing it down to half or even quarter speed.
Intermission
Stealing a Saurus (the green Yoshi), TAS travels into the desert. Following some other fleeing folks, TAS narrowly misses getting caught up in a regional war. After watching the battle, while enjoying some lovely popcorn and cola, our hero returns to the aftermath for a great selfie photo-op.
Finally, racing his new found travel buddies, he runs face-first into an invisible barrier otherwise known as the right-hand side of the screen.
It's a cutscene, so not much to say here. Definitely some uninteneded oddities happening as a result of playing at the fastest animation setting. Also, I remember laughing a lot when I first encountered the Intermission screen when first playing this game all those many years ago. :)
Raseir - The Long Wait (Part 1)
Having crossed the wide desert, TAS finally comes upon the city of Raseir. Following a rude reception at the city gates, he makes his way to the local inn and there meets a creepy man by the name of Ferrari. He invites TAS to sit, have a drink and chat. Unfortunately for our hero, the drink is spiked, causing him to spill all his secrets, and then run around wildly for three hours before finally going to bed.
Our next goal is to get to bed. Unfortunately, the bedroom doesn't open up until 8 pm, and since the map doesn't work here, there's no fast way of making time pass. In an odd twist, the fact that our character's stats are low helps us out, as the lower your vitality is, the longer time jumps when you are talking with Ferrari. In this case, the chat takes us from 2 pm to 5 pm, but that still leaves three hours to kill.
Although, there is no quick way of getting to bedtime, there is a TAS-only trick that can help speed things up a bit: There is an interesting bit of code that is executed on screen transitions. If the game clock variable is an even value, changing screens increases it by one. However, if the game clock variable is an odd value, changing screens decreases it by one. By watching this variable in memory, it's possible to change screens every time the variable is even, nudging the game clock forward slightly each time. This shaves over 70 seconds off an unassisted run where you just have to stand around. It also means when you first enter the city, it's faster to slowly walk to the Blue Parrot Inn to get to the door on an even clock value, than it is to quickly run and get there on an odd value.
Raseir - The Long Wait (Part 2)
TAS wakes up from a fitful sleep, and decides to explore the city of Raseir. He quickly comes upon a scene where a man is dragged off to prison for carrying water. Not wanting to cross the law, he decides to head back to the inn to hide from the guards. On his way he is beaconed to a side room where a young lady awaits. She asks him for his clothes, and he excitedly begins disrobing. Unfortunately, she was more interested in his spare pair. After she changes, the lady asks for something else... his official documents or something like that. Still in a bit of a fog, hoping for a chance of getting her favor, TAS says 'Yes'.
It's only after she leaves that he realizes that he can't be caught without his visa, and out of fear (or maybe pent-up adrenaline from watching a lady change), he spends the next couple hours wildly running around. He is so paniced that he ignores the servant's warning about a guard approaching, and upon being discovered, he is is promptly thrown in jail.
Giving Zayishah your spare clothes and visa is mandatory, as you can't get into the Forbidden City without the mirror she gives you. Unfortunately, after leaving Zayishah's room, the game clock is set to 4 pm, meaning you have to burn four hours to be able to get into the bedroom. Even with speeding up time with screen transitions, it still takes about four minutes to kill that time. Luckily, as I was scanning through the code to her room, I stumbled across a line that redirects the game to the jail, which is exactly where we want to be. Just by waiting three minutes, a guard comes by and shortcuts you to your next destination! Much better than waiting around for bedtime.
The Forbidden City
Fortunately for our hero, Raseir's jail is not very secure. TAS breaks out and is now a fugitive in the city. While escaping, TAS encounters a man... no, a friend... yes, a good friend by the name of Ad Avis. TAS wants to help Ad Avis get something called Ibis. Ibis is good and will make everything all right... yes...
Ad Avis leads TAS to the door of the Forbidden City, wherein lies Ibis. TAS uses his mirror to open the door, and then walks into darkness. Luckily, TAS has a lamp (that is empty, but who's counting anyway?), and rubbing the lamp makes it shiny enough to see by. TAS overcomes the trials of Air, Water, Fire and Earth OW! Why does Earth have to be so hard?
, and makes his way to Ibis. Ad Avis appears and takes Ibis to safety just before a rockslide happens, leaving our hero alone in the dark.
The Forbidden City is pretty much a straight run through. As much as I tried, it is impossible to catch the first log in the waterfall on the hardest difficulty. I am certain running through the fire room at the fastest speed on the hardest difficulty is TAS-only.
Attack on the Palace
Alone in the dark, our hero descends the path. At the bottom is a ring, in which lives a Genie Djinni who can grant wishes. Of course, TAS's only wish is to escape to someplace safe. But instead of granting TAS's wish, the Djinni takes him back to Raseir, right in front of the Palace gates in plain view of guards. With no other option, TAS charges the gates, taking down a couple guards on the way. Using magic to distract the Captain of the Guard, TAS makes his way further into the palace, where he finds his old friend, Ad Avis, doing a little dance with Ibis. Suddenly, TAS notices the scary-looking statue in the corner, and flees in terror towards his friend. As he approaches, TAS trips over a fire trap and accientially bumps into Ad Avis, sending him to his death. The evil Djinni returns and takes Ibis away, never to be seen again.
Although using Flame Dart to take out both guards is doable in an RTA speedrun, the bodies of the guards leave a horrible maze to navigate to get to the door. In a TAS, it's much easier. Our hero has two two ways to take out Ad Avis: Bull rush him, or throw a dagger to knock over the brazier onto him. Since the first one invloves no typing, it's easily the fastest of the two. Ad Avis falls to his death, the Djinni's last non-automatic dialog is cancelled and it's finally...
The End?
Returning to the fountain in Raseir, TAS discovers he's had a Water Elemental in his pocket the whole time. He flies back to the court in Shapeir, where people lavish him with praise, and tell of all the great things he never did. TAS is a hero once again, and will bask in his newfound glory (until he leaves before everyone figures out the truth).
One of the advantages of TASsing Sierra games is the rather long 19-character keyboard buffer you can take advantage of. It lets you queue up all your commands and end input significantly early.
At the end, I set up the buffer to type all the necessary keys to get past the last mandatory input, saved the movie, and set it to dump to file (which takes over four hours). Then I went to bed. In the morning, instead of the end game screen, I woke up to this:
This is the exact same error I avoided at the start of the game by only selling one beard. As I mentioned above, it isn't fatal, it just requires hitting <Enter>... which ruins any attempt of ending input early! To make things worse, I looked in the code, and this message is only displayed once per game, meaning that if I had simply sold two beards, then I wouldn't have encountered this error here and ending input early would have been feasible!
In the end, selling two beards instead of one shaves over three seconds off the run due to being able to end input early. I tried splicing in a change to sell two beards, but it caused desyncs everywhere, and is simply not feasible. And I don't have it in me to go back and re-run the entire TAS from the beginning. mrprmiller, the RTA record-holder for all the QFG series, contacted Corey Cole, one of the game's creators, to help out with trying to get around the error, but to no avail. Seeing as ending input early is optional, I decided to submit this as is, and if I ever find a way around the bug, I'll post an update.
Potential Improvements
Apart from the End Input Early improvement mentioned above, rumor has it that playing using the Roland sound driver cuts down on screen transition time. Unforutnatley, JPC-rr isn't equiped for Roland sound, meaning such a run would be silent right now. If Roland is ever supported, several more seconds could be saved.
EDIT: I just discovered that the Wizard can do the exact same route! I thought the Wizard couldn't escape from the statue at the end, but that's only if he has the Trigger spell. By choosing a Thief instead of a Wizard, I waste 0.3 seconds giving magic to my Thief. Just picking Wizard at the start would have saved that. Like above, to fix this I'd have to start the run over from scratch, and I don't think I have it in me to start all over again to save 0.3 seconds. Definitely, though, if another big saving is found elsewhere, it would make sense to fix this too.
I want to give a big shout out to mrprmiller, QFG-speedrunner extrodinare. I have him to thank for getting me started on QFG TASses, and for all his help and enouragement along the way. For anyone interested in doing a QFG TAS, he [/Forum/Topics/9107&postdays=0&postorder=asc&start=103|has a bounty] set up for them. I'd be happy to give my advice and a copy of my modified JPC-rr too. FYI, the bounty for this run will be going towards my
Extra Life fundraiser. And if you're ever looking for some great RTA speedrunning, check out mrprmiller's
live-streamed marathon speed run of QFGs 1-5 for
RPG Limit Break (run by a lot of the staff from AGDQ), where he did the run while talking with Corey and Lori Cole, the creators of the QFG series, at the same time! It's just amazing to see! Finally, kudos go out to all the folks at the QFG Speedrunning Discord. Keep questing!
A Question for Glory!
From here on out the games in the series get longer and more complicated, and there may come a time when there is an advantage to start from a character file exported from a previous game. Unfortunately, if I use JPC-rr to generate a verification movie, I don't know a way of exporting the generated character file from JPC-rr to a hard drive to be included in the actual run. Would a DosBox video would suffice as a verification movie? If not, what method would be needed to be able to start QFG3 (or later) from an exported character file? Discuss in the comments!!
Suggested Screenshot
Files:
HDD, 16 tracks, 63 sectors, 16 sides.
Timestamp | MD5 | Size | Filename |
---|
19900101000000 | eeca13109c381afef6584d78daaccab2 | 7976 | ADL.DRV |
19900101000000 | 57a3da77af2b48851cf048e5752695fb | 2049 | CGA320M.DRV |
19900101000000 | 4b5bd8739e73f44ce5562b93b2723287 | 3734 | CMS.DRV |
19900101000000 | d80d8207b80d8d108c749a2d5629cb15 | 3273 | EGA320.DRV |
19900101000000 | 61f35eec8998802abe2118b26e0c9cfa | 574 | EXISTS.COM |
19900101000000 | 4ff2dc339352972581da584cc0a8d2f1 | 1782 | FONT.000 |
19900101000000 | 28d7efe8c850bfb52231fc58567e25cc | 507 | GODIR.COM |
19900101000000 | 2bc97203eb593636d0271569e3c01f92 | 2212 | HERCMONO.DRV |
19900101000000 | fdf344726b857a44934eb14dd0d37c59 | 449 | IBMKBD.DRV |
19900101000000 | 121983ae1b4df7c47986bd32f5790ab3 | 4354 | IBMPS1.DRV |
19900101000000 | 7271fb1d6430c1807584021e8d01dc58 | 13355 | INST.EXE |
19900101000000 | 20aeb5df74627a17202ff290925f5f1c | 2169 | INSTALL.BAT |
19900101000000 | e152f2bce8445fa4fba255d1668b8416 | 6464 | INSTALL.HLP |
19900101000000 | 549c24a94d6a602591909039f4bd9ac7 | 727 | INSTGAME.BAT |
19900101000000 | c75b73974160ff652a909a0d01f97214 | 607 | JOYSTICK.DRV |
19900101000000 | 3a24c298a2d77b07d9459ba89d9bf375 | 2745 | MCGA320.DRV |
19900101000000 | 1216bb30f321c652909aa1c2239dd7d4 | 1989 | MT32.DRV |
19900101000000 | fe18a816a08c89f245f9143642bf84eb | 212119 | RESOURCE.000 |
19900101000000 | 733686eea71255794a9762f683ac789f | 867866 | RESOURCE.001 |
19900101000000 | 3d5223fd488fb04025ba3199485a0756 | 790750 | RESOURCE.002 |
19900101000000 | f0544e220e3a5b66df2070d9638527b4 | 972804 | RESOURCE.003 |
19900101000000 | 7cb86c2af9399b81a1f796a6b07aeeb3 | 983617 | RESOURCE.004 |
19900101000000 | f961b3028d27f36b778e10bfd78e3da0 | 79 | RESOURCE.CFG |
19900101000000 | 06d0cb2c9496d7d4494b0f37f2c6c4c2 | 6906 | RESOURCE.MAP |
19900101000000 | 2a20c5077e59902e84f26982b502c10a | 59150 | SCIV.EXE |
19900101000000 | 48e6faeb6af8e540fed0523f17ec4c0d | 538 | SIERRA.COM |
19900101000000 | 7ed06259b381a75fe4e761e4bbeb963d | 9672 | SNDBLAST.DRV |
19900101000000 | c645587408e33998e9fc6f51be4ee639 | 500 | SPACE.COM |
19900101000000 | 380f442686174ae0282b851ac4c1e765 | 1448 | STD.DRV |
19900101000000 | f70edf481b1a320fd10190fe041c29cc | 4429 | TANDY.DRV |
19900101000000 | 3e0716270e0953a5a64c95a9765b9c9f | 2999 | TANDY320.DRV |
19900101000000 | bf2856d43f4bc063fe20820651dc1657 | 3893 | TANDY3V.DRV |
19900101000000 | da0e7a40996a64224d918069ef8adea9 | 476 | TANDYKBD.DRV |
19900101000000 | 04a413f79a5e15bcad59ae5d39824694 | 10 | TRIAL.BAT |
19900101000000 | d4129050848dc8628e43b64ac751a28e | 900 | TSTDRIVE.EXE |
19900101000000 | 26913b564c71d9fb7f83e0f4f165d999 | 7 | VERSION |
19900101000000 | 5511c133471681cab70295d860be96c4 | 2449 | VOCAB.913 |
19900101000000 | 1d3beaac41d0d09790a47c8dc1cadf85 | 112 | VOCAB.994 |
19900101000000 | b99b2ceac1a672c6e4785b48d6dc11be | 609 | VOCAB.995 |
19900101000000 | f230096194cc9791737b634b36ac7980 | 590 | VOCAB.996 |
19900101000000 | e501f7de3c7a3b68d6d11f0b965b6697 | 8339 | VOCAB.997 |
19900101000000 | 0ef7f63b24dfe1bbeea28e2f8ede90d6 | 1229 | VOCAB.998 |
19900101000000 | df638320d85ee4029e6c3d62b86f7043 | 1148 | VOCAB.999 |
19900101000000 | e6a4bd8b2f3391791797d4a372c0a7ab | 27 | _HDTRIAL.BAT |
19900101000000 | d7d2d88a7695db8e0f39bd81cd7eec9f | 1071 | __INSTH.BAT |
Noxxa: While there's a fair amount of repetitive waiting, it doesn't really drag down the run too much. The quest for the most part still remains enjoyable. Accepting for Moons.