Star Wars: The Empire Strikes Back
This is an update to my first TAS from way back in 2011. Star Wars: The Empire Strikes Back was a well made, though fairly difficult platformer. After the previous TAS I found a significant skip for stage 1, and some improvements to the route were made by RTA runners. This will be covered in more detail in a later section.
Encode
Game objectives
- Emulator used: Bizhawk 2.9.1
- SHA: D6D5ABC2477FB25E8F95DBEA0110422400B88DFE
- Aims for fastest time.
- Takes damage to save time.
- Abuses programming errors.
- Uses Up+Down to save time.
Controls
- A - Jump
- B - Fire Blaster/Swing Lightsaber
- start - Pause/Force Menu
- select - Swap weapons, dismount Taun Taun, Fire tow cable.
- Up/Down/Left/Right - Movement
- Up+A - Jump to the background in stage 2 and initiate sabotage.
Force Powers
Note that only Speed and Levitate are collected in this run.
- Blaster: Increases blaster damage.
- Levitation: Allows Luke to levitate.
- Light Saber: Increases light saber damage.
- Speed: Increases run speed.
- Deflect: Automatically deflects blaster fire from storm troopers.
- Jump: Makes all jumps charged jumps at the cost of force power.
- Health: Recovers health at the cost of force power.
- Mind Control: Prevents storm troopers from firing at you.
Improvements on the previous TAS
Taun Taun flight
The main trick that I discovered after finishing the previous TAS has to do with the Taun Taun physics in stage 1. The select button is used to dismount, but dismounting isn't allowed in the air. There is an error in the physics here, if you press A one frame after you press select you are allowed to jump. This means the Taun Taun can jump at any time, and can effectively fly anywhere. This allows for a significant improvement on stage 1 because of how the conditions for ending the stage. As it turns out the game is only checking your X position, and if you fly up and to the left from start you can get on top of the wall and head to the left until your X position underflows and ends the stage. While not technically required it still makes sense to go get the light saber in stage 1 because without it you are not allowed to sabotage the AT-ATs in stage 2.
Force Speed
In the previous TAS I chose not to get the force speed. It is pretty far out of the way, so it didn't seem like it would be worth it. Changes to the RTA route suggested otherwise though, and some calculations based on the movement speed led to the conclusion that it is well worth it. In fact it is probably the bulk of the total time save.
Force Blaster
The previous TAS picked up force blaster, but even without some of the route changes I'm not sure it was worth it. With route changes taken into account the bosses at the end of stage 3 are probably the only place to consider force blaster, but it might not even be worth the pause menu much less the detour. On top of that it would be force power better spent on force speed.
Route Change Summary
- Most of stage 1 is skipped due to the Taun Taun flight
- A bounty hunter near the beginning of stage 7 is skipped, the barrier forcing you into it only spawns if you scroll too far right.
- Boba Fett is skipped, runners found that you can levitate over and avoid triggering the fight.
- Force Blaster is skipped.
- Force Speed is picked up and used to great effect.
- Force Levitate is more heavily used.
- An alternate bounty hunter is killed and another one is skipped at the end of stage 9.
Movement and Techniques
One of the difficult parts of updating this TAS was getting started. Several times I tried to start and had trouble optimizing movement in stage 1. Eventually after learning about down cancelling and trading ideas with ScarfaceNico and thebagler5 I was motivated to do enough research to be able to optimize movement to a decent level. Here is how it works.
Taun Taun
Walking
This is one of the more complicated scenarios. The Taun Taun's walking speed is table based. The Taun Taun cycles through 2, 4, 2, and 3 pixels per frame for 6 frames each. This averages out to 2.75 pixels per frame. Where things get interesting is when you stop moving. The index for your movement speed is reset, but the offset for which of the 6 frames of that speed you're on is not. This allows for several sequences that give you a higher total speed (each number represents the number of pixels moved on a frame):
- 2222224444440 - This works out to 2.769 pixels per frame, which is a little bit faster than holding right.
- 3333322222244444420 - This works out to 3.42 pixels per frame, which is a pretty significant improvement
- 3222222666660 - Thi is better yet at 3.46 pixels per frame.
Note that at this speed it is actually possible to outrun the camera. Unfortunately scrolling off the screen completely is not useful. The game appears to detect this and put the game on hold for a number of frames to reset the camera and center it on you, wasting time.
Select Bumping
When the Taun Taun is in freefall the X position is normally locked (this is also true for Luke). If you press select the Taun Taun will be bumped forward by one pixel, you can mash at 30 Hz for some extra distance. This is most noticeable when dropping down in stage 1 to head for the light saber.
Landing
The select button allows you to dismount, but if you're not on the ground it has other effects as mentioned earlier. Depending on your alignment one of those effects is that it allows you to land on the front corner of a platform a pixel low and skips the landing animation.
Luke
Walking
Luke's walking speed is 2 px per frame and is to be avoided almost entirely. There are cases where the platforms are effectively not a good multiple of the jump distance, and it turns out to be faster to continue doing full jumps and spend a couple of frames walking off of a platform than to use shorter jumps.
Jumping
Stage 1:
A press frames | distance | frames | speed(px/frame) |
1-10 | 54 | 21 | 2.57124 |
11 | 60 | 23 | 2.60869 |
12 | 63 | 25 | 2.52 |
13 | 66 | 26 | 2.53846 |
14 | 69 | 27 | 2.55555 |
15 | 72 | 28 | 2.57142 |
16 | 75 | 29 | 2.58620 |
17-29 | 78 | 30 | 2.6 |
Subsequent stages:
A press frames | distance | frames | speed(px/frame) |
1-10 | 51 | 20 | 2.55 |
11 | 57 | 22 | 2.59090 |
12 | 63 | 24 | 2.625 |
13 | 66 | 25 | 2.64 |
14 | 69 | 26 | 2.65384 |
15 | 72 | 27 | 2.66666 |
16 | 75 | 28 | 2.67857 |
17-29 | 78 | 29 | 2.68965 |
Charged Jumps
A charged jump is 138 pixels in 51 frames which is 2.706 pixels per frame, but this does not include the charge time. You can charge while you're still in the air, but not fast enough to chain them together. This means regular full jumps are faster than chaining together charged jumps, but there are situations where charged jumps are useful. In particular if there is a large drop that makes the charge free, or if used as a part of spawn manipulation.
Down Cancelling
When landing (both with Luke and the Taun Taun) the character gets stuck in a crouch animation for several frames. If you press down for a frame once you're on the ground the character will stand from that crouch instantly. This allows you to continue moving right away, and lessens the penalty for jumping or falling.
Levitating
A force allows you to levitate. Your speed while levitating is 3 pixels per frame left, right, or down if you're holding that direction. Upward speed is 1 pixel per frame. If you are neutral on the dpad you will move 1 pixel per frame in the direction you're facing and 1 pixel per frame downwards.
Conveyors
As you might expect conveyors add or remove speed based on the direction they're moving. The important thing to note here is that while levitating you can touch the floor for 1 frame without the levitate actually stopping. The conveyor speed is applied on this frame and you can press up to rise and continue levitating. Done repeatedly this moves Luke very fast, quickly outrunning the camera. As mentioned before, fully outrunning the camera needs to be avoided.
Corner Boosting
Similar to when you put down on a conveyor while levitating you actually get a couple of extra pixels when you land on the ground, however you end up moving 0 pixels on the next frame. This means you move at a net lower speed if you keep touching the ground as you levitate along. The exception to this is if you touch down on the far edge of a platform, you get the boost of a couple of extra pixels, but you don't get the 0 movement on the next frame, and you still keep levitating.
Spikes/Damaged Areas/Etc.
There are some high damage/instant kill areas, but it seems the check for death doesn't happen the first frame you're on the ground, even if you're already out of health. You can survive if you keep jumping on the first available frame. This is useful in a couple of spots, but it is also dangerous since you are then on 0 health going forward.
Charging on Ladders and Vines
This is only useful for very specific situations, but if you're climbing on a ladder or vine and you hold down you will climb down, but you will also start charging a jump. If you simultaneously hold up it will keep you from climbing down, but your jump will continue to charge.
Electricity
It seems the jumping isn't fully interpolated, so the electric beams in cloud city may not do damage depending on where you are in your jump cycle, particularly in the launch phase.
Camera Manipulation
The first 5 frames of your jump are spent crouched in place. Generally speaking this means you can switch directions for a few frames at the start of your jump and effect how much the camera scrolls without affecting your overall speed and position. This is useful to manipulate spawns in some places.
Light Saber Damage
I still don't have a full understanding of the way light saber damage works, it seems a little complicated with the way hitboxes work. I'll describe my strategy to deal damage the fastest though. If you stand a certain distance from an enemy (with a range of a few pixels) you can deal as much as 15 damage with each B press, if you're jumping you can mash at 30 Hz dealing 15 damage every other frame (assuming there is no lag and you can stay in position).
Barriers
Certain areas in the game are blocked by invisible barriers. These barriers spawn at a certain point, it seems to be related to the camera position. The barrier will be removed if you kill a boss, and it seems like it can be any boss (though there generally aren't many options). Some of these barriers can be skipped entirely if you can avoid triggering them to spawn. If that isn't a choice you may have a choice of which boss to kill in order to take down the barrier. On rare occasion I've seen this cause confusion with casual players or new runners. Normally there is a barrier after the probe droid, but if you move close enough to spawn the barrier, then go back and kill the Wampa it will still remove the barrier.
Stage By Stage Comments
Stage 1: Hoth
As mentioned previously the new route here is to just go in and get the light saber and come back to the beginning to get out of the stage. The strange looking thing here is that there are a couple of spots where I'm doing air jumps for seemingly no reason. There is a dialog box a the beginning and one just before the drop in, the hitboxes for which have limited height. It happened to be a few frames faster to skip them, but it was very close.
Stage 2: Snow Speeder
The route for this is the same as before, but the movement is slightly improved. You have to take down 10 AT-ATs, but you only have 5 tow cables. Blasting them takes an eternity, so to minimize traveling on foot the route is cable 2, sabotage 4, cable 3, sabotage 1. Note that you do have to pick up some drops to get fresh snow speeders to spawn, as a bonus they also restore some health.
Stage 3: Echo Base
There is a force light saber power up at the beginning of the stage, but it is still ignored in the TAS since it is pretty far out of the way, and the TAS can do a lot of damage with the light saber without it. I spent a bunch of time trying to make it onto the first elevator while it was on its way up, but it seems it is jut barely not possible. The moving platforms are another story. Normally they spawn as you jump up from the first elevator. It is super tight, but I found it is just barely possible to head to the left and despawn the first moving platform and then chase it down, which is much faster than waiting for it to move all the way to the right. The second elevator is a pretty long wait, but there just weren't many options to manipulate it since you are tide to the other moving platforms when it spawns. In a change from the previous TAS I go pretty far out of the way for the force speed, but I still jump through the damaged area on foot losing my health in the process. This time I skip force blaster for reasons described above. I manipulate the camera a bit for a favorable probe droid spawn. From there it is just two fairly straight-forward boss fights on a run to the end.
Stage 4: Dagobah
The primary way this stage has changed is that we can use force speed to get past the spiders (and as much as possible elsewhere). There is also one spot where the previous TAS climbs higher than necessary wasting time.
Stage 5: Dagobah 2
Simlar to the previous stage this stage is primarily transformed by the use of force speed. I also found I was able to spend less time waiting on platforms. Technically it is possible to skip the force levitate and get it later, but since it allows us to skip some things and go faster it makes more sense to get it here. Shortly after the levitate grab there is a spot where it turned out to be faster to use up+down to do a vine charge and charge jump around to the platform above. You can also levitate all the way, or jump to the platforms on the left, but those options are slower. The rest of the stage is pretty similar, just with force speed and some better movement.
Stage 6: X-Wing
I did a little bit better tracking enemy spawns offscreen in ram watch and trying to manipulate more favorable spawns when possible (especially in the tie-fighter section).
Stage 7: Cloud City
To start with I was able to levitate through and skip the dialog with Lando. I had to be a little conservative with force speed here since it wasn't worth going out of the way for more. It was also a bit difficult to minimize lag with some of the storm troopers, but it came out pretty smooth. The previous TAS also killed an extra bounty hunter here, but as long as you don't move too far to the right the barrier next to the electricity doesn't spawn. The big payoff here is being able to levitate over and avoid triggering the Boba Fett fight.
Stage 8: Slave I
This is slightly faster just due to doing a better job of matching up with the speed of Slave I.
Stage 9: Cloud City 2
Levitate is used much more compared to the previous TAS, and force speed keeps things cruising along. I have to be careful to stay on screen since there are several instances of conveyor belt boosts. I also don't bother waiting for the long elevator. It looks a little strange skipping the backup levitate, but there is a forced dialog box that goes along with it, and there is another force refill just ahead after the bounty hunters. There is an unavoidable barrier that spawns just as you jump down from the conveyor area to the two acrobatic bounty hunters, so we do have to defeat one. Fortunately whatever triggers the takedown of the barrier seems to last well into the death animation, so I was able to kill one of the bounty hunters on the conveyors above along the way and get down to the barrier spawn trigger. This means I spend less time stopping to fight. At the end it is just a levitate over everything, including the trigger for an additional barrier that forced another bounty hunter fight in the previous TAS.
Stage 10: Vader
This stage is a little light on force powers, so I ended up testing and redoing more than I would have liked in order to make the most effective use of the force. There is a cost to picking up the first force refill in the stage, but it is well worth it since we need as much as we can to keep going fast, and the refill that drops after the first Vader fight takes way too long to drop. I was a little surprised at how good this was, but you have time to charge a jump when you drop after the first Vader fight, and it actually makes sense to use force speed so that you can use that charge to get up and away after skipping the 2nd Vader. It also worked out faster to start the levitate that takes us up over the top of the pillar Vader fight a little earlier. After that levitate there is a shortcut that RTA runners found where you could clip through the corner and cut some distance out of the route. Up on the spikes I ended up jumping across them (wiping out my health) which saves a little over going up and back down. Dropping down to the bounty hunter it is a little faster to spend a few frames ducking his shots and walking off the edge than it is to take a damage boost. I was fortunate to pick up a health drop from the enemies just before the levitate required ascent in the force route I ended up with. I manage to save just enough force to pick up another refill to head to the final fight (if you run out you are required to menu in order to re-enable force speed). From there it is just a cleaner Vader fight, and an impatient wait for Vader to fall.
Possible improvements
- Stage 2 has a known glitch. If you jump into the background (up+A) and there is no AT-AT to sabotage Luke will jump back. If you jump again right away the animation will run again, but at a higher Y offset. You can keep repeating this until you wrap the screen. Some of the graphics get messed up, but it doesn't seem to break the game. If there were
a way to break the game further here maybe there would be some sort of ACE or something.
- There may be other improvements to the force routing, or just general movement optimization.
- There are likely frames to be shaved with better spawns in the X-Wing battle.
Thanks to:
- ScarfaceNico and thebagler5 for their help and encouragement.
Screenshots:
2053, 5940, 16797, 17410, 22431, 26893, 27195, 30039, 31335, 32957, 38153, 38473
Samsara: Claiming for judging.