Space Quest: Chapter 1 - The Sarien Encounter

This is the original EGA version of Space Quest 1.

Introduction/Story

Space janitor extraordinaire, Roger Wilco (aka TAS), survives a Sarien attack on his ship, the Arcada, by hiding in his janitor's closet. The Sariens, who have a grudge against Roger's people, steal the Star Generator--a device to create a new sun out of a lifeless planet--from the Arcada intending to use it's power to destroy Roger's home planet of Xenon (think Death Star).
Now Roger (TAS), as the only survivor, has three tasks he must achieve to save his people:

Escape the Arcada, as the self-destruct mechanism has been activated.

Find out where the Sariens have gone.

Find a way to prevent the Sariens from destroying his home planet.

All in a day's work for a space janitor.

Temporary Encodes

The first is the run at normal speed. The second is the run at 1/5th speed; it's much easier to follow the action with this one.

Challenges and Opportunities

Text Entry
The game doesn't display typed text every frame. However, multiple keystrokes can be buffered into emulator memory on a single frame and will all be displayed when the game polls for this input. This rarely hinders progress as text input can usually be accomplished during periods of movement unlike games like Quest for Glory or Space Quest 3 where the text input box can pause movements.

Desyncs
As c-square has mentioned in other submissions, JPC-rr is horrible for being able to splice in changes after the fact. Making a change can cause many desyncs down the line. Therefore, it is imperative to ensure every screen is fully optimized before moving on to the next.

Major 'Luck' manipulation--RNG was manipulated in multiple ways.

The random seed is changed only when the random function is called, so the sequence of random seeds is calculable.

Certain commands in the game advance the random seed by calling the random function to yield a random response from the game. One of these commands is simply typing 'y' and hitting enter to advance the RNG seed one step in its sequence. This was used frequently to obtain an ideal seed value for a desired outcome.

A spreadsheet for the sequence of random seed values was developed based on the randomization formula. Though, this was initially created to aid in optimizing the slot machine sequence, we also realized that it could be used to predict and manipulate other aspects of RNG from Sarien guards, the rocks in the skimmer sequence, to even the drips of acid in the Kerona underground. Utilizing this RNG-seed spreadsheet we determined a value for the initial random seed that would yield no guards patrolling on the Arcada as well as opportunity to manipulate the longest delay for the arrival of the Spider droid on Kerona.

However, we were initially unsure how exactly to obtain this value for our initial random seed. We knew the value was tied to how many milliseconds after midnight the initial seed was set, but we did not know the exact mathematical formula for how it was calculated. Through a combination of brute force testing and mathematical calculations, we were able to craft a second spreadsheet which gave us the initial seed value based on the initial RTC time setting. We then started the run with this RTC value set at assembly in the emulator.

Specific RNG manipulations (and some non-manipulations)

As mentioned above, the initial RTC time in JPC-rr was set to yield no Sarien guards showing up on the Arcada.

The initial RTC was also selected to yield an opportune random seed value for maximizing the delay of the arrival of the Sarien Spider Droid on Kerona; only one 'y' command was needed to advance the seed value to yield the longest delay.

A 'y' command is used to avoid acid drops in the Kerona underground.

Though possible, we did not use RNG manipulation to manipulate the rock placements during the Sand-Skimmer sequence. c-square developed an lua script that attempted to avoid/control rocks during the sequence, but it was not utilized in the final TAS, as the sequence itself is a timed event. Manipulating RNG would not have saved time, but may have made the movements easier.

We got lucky on the RNG for whether or not the skimmer is stolen in Ulence Flats and didn't require manipulation to not have it stolen.

We used a handful of 'y' commands to minimize the time before the alien at the slot machine gets vaporized. As can be seen, he is eliminated before we can even reach the slot machine in the bar.

Using the RNG sequence spreadsheet and about a dozen 'y' commands, we destroy the slot machine in a matter of seconds by controlling the RNG for the spins and maximizing payouts.

'y' commands are used a couple times on the Deltaur after obtaining the Pulse Ray to manipulate the appearance of guards instead of the killer droid. Further manipulation could be utilized to eliminate guard encounters, but would take more time than just shooting the guards.

Area Specific Comments

Arcada: It is possible to complete the game without obtaining certain bits of information normally needed to progress in the game. This run skips learning about the data cartridge from the dying scientist. It skips obtaining and later reading said cartridge to get the self destruct code for the Star Generator. (Side Note-these actions were made necessary in the VGA remake via copy protection/RNG means.) Thankfully, Roger is only required to obtain the keycard necessary to access the lower levels of the ship and escape.

Escape Pod:
Auto Navigation can be activated prior to engaging the throttle. This seems surprisingly little known in the documents I read during my research for this run.

Kerona Desert:
It is not necessary to be instructed by the underground alien to kill Orat before you do so. Thus, this run heads directly to him after gathering items from the crash site. His remains are then taken to the underground caverns ignoring the spider droid. (Side Note - The spider droid can also be used to kill Orat, eliminating the need to get the survival kit and open it; but it takes much longer. Radiant figured out that you must be instructed to kill Orat by the underground alien before this method will work.)

Underground Caverns:
Nothing special here other than the minor RNG manipulation for the acid drops, just normal run through the passages.

Skimmer Arcade Sequence:
Unskipable in this version (can be skipped in the remake). See above for RNG comments.

Ulence Flats:
The skimmer is sold ASAP to get the jetpack and money for the slot machine. We skip buying/drinking beer necessary to get the information of the Deltaur being in Sector HH.

Slots (Major RNG dependency)

This was the most difficult and time consuming part of making this TAS.

Spins call the random function a different number times depending on whether or not the spin is a winning or losing spin. A randomized value determines whether or not a specific win result occurs, or whether a random sequence of symbols appears.

This submission's slot-machine sequence is GREATLY reduced compared to DrD2k9's first submission. This improvement is due to a better understanding and control of RNG.

After obtaining the necessary funds to buy a ship (and a droid to pilot the ship), We do so and leave Ulence Flats.

Deltaur:
Pretty straightforward run from here on. Once Roger loses his helmet, appearance of Sarien enemies/droids is RNG controlled.

Star Generator Keypad

At 'Fastest' game speed, the cursor moves too fast to click the appropriate numbers, thus the speed is reduced to just 'Fast' for the numerical inputs, then returned to 'Fastest' to quickly access the 'Enter' button.

There are at least two layers of timing in this game. One for internal clock times (Star Generator self-destruct countdown, Arcada Self-Destruct countdown), and another for movement speeds. Unfortunately if the game in left in 'Fastest' mode after inputting the destruction code, the Deltaur will explode before the game leaves the keypad screen (itself a set timed delay after inputting the destruct code.). Therefore, we again slow the game speed to 'Fast' so that we can regain control of Roger and get him off the ship before it blows.

This is the single longest individual portion of the game. If the sound were left on, a VERY annoying alarm/beep goes continually throughout this wait. As such, we use an 'F2' input to turn the sound off just prior to the wait and another 'F2' input to turn it back on just following this wait.

After initiating the self-destruct on the Star Generator, Roger escapes the Deltaur and (somehow) returns home.

The End:
Roger is awarded the Golden Mop for his deeds (once a janitor, always a janitor).
This run does not, however, yield the best ending. Because Roger fails to retrieve the cartridge with the Star Generator plans from the Arcada, his people are unable to build a new one and save their solar system...meaning they all die eventually anyway. In a run that obtains this cartridge, the ending text is slightly different indicating the better achievement.

Potential Improvements

The most likely improvement possibility are based on better RNG manipulation; though the total time saved would likely be fairly minimal.

Actually manipulating the RNG during the skimmer sequence to yield a better string of random seed values for the slot machines could save time.

Determining a different starting RTC time for JPC-rr that yielded a string of random seeds that required less manipulation to begin with would also save time.

The wait during the Detonator Keypad screen is preset in the game code. If someone were able to find a way to alter this in-game, quite a bit of time could be saved.

Moving at the 'Fastest' pace used in this run is extremely difficult to end up where you want to go. There may be better movement patterns which we have not found.

Other Comments

As this game foregoes multiple point gathering opportunities, it's definitely not a 100% run and one of those could theoretically be done as well.

Mothrayas: Some nice efforts have come together to optimize the run after the previous submission, and the results are quite apparent. Nice work on the RNG analysis to speed up the slot machine section, and nicely done run overall. Accepting to Moons.