Cobra Command is an action game released by Data East in 1988. The Player controls the LX-3 SuperCobra (a fictional variant of the real Bell AH-1 SuperCobra) through 6 stages in various locations of Southeast Asia, to rescue hostages and to destroy enemy tanks, cannons, submarines, and gunboats. This, the Famicom/NES port, is based on the arcade game "Cobra-Command", released earlier that same year, which in turn is the titular sequel to the classic LaserDisc arcade game "Cobra Command" released by Data East in 1984. This original 1984 version was also later ported to several optical disc consoles as "Cobra Command". Of course, this is not to be confused with COBRA Command, or its leader, Cobra Commander, of the "G.I. Joe: A Real American Hero" franchise. All of this can make researching the game a bit complicated. Nevertheless, it is much better than the working title, "Stiffen Wolf" (yikes!).
Game Objectives
- Emulator used: FCEUX 2.2.1
- Aims for fastest game completion
- Aims for maximum score without sacrificing Frames
- Takes damage to save time
- Uses death as a shortcut
- Abuses programming errors
- Uses U+D/L+R
- Manipulates luck
- Entertains without sacrificing Frames
- Flies backward for great justice
Tricks and Glitches
Instantaneous stop:
Using Up + Down can allow the Cobra to change elevation more quickly and accurately. Normally if you press and release Up or Down, even for just 1 Frame, the Cobra will "drift" up or down for as many as 22 Frames. The exact amount of "drift" is determined by the Cobra's Y position at the time the input was entered. To interrupt this "drift", release all directional pad input for 1 Frame, then hold Up + Down for 1 Frame. This will cause the Cobra to immediately stop at its current elevation. This can also be done by releasing the directional pad for 1 Frame, and then pressing the directional pad for 1 Frame in the same direction as it had most recently been pressed (this is counterintuitive, but it works).
Using Left + Right can allow the Cobra to change forward/backward flight direction more quickly and accurately. Normally if you press Left or Right, even for just 1 Frame, the Cobra will "drift" forward or backward for as many as 10 Frames. To interrupt this "drift", release all directional pad input for 1 Frame, then hold Left + Right for 1 Frame. This will cause the Cobra to immediately stop at its current X position. This can also be done by releasing the directional pad for 1 Frame, and then pressing the directional pad for 1 Frame in the same direction as it had most recently been pressed.
To do the same as the above while the Cobra is moving diagonally, release all directional pad input for 1 Frame, then press Up + Down + Left + Right for 1 Frame to cause the Cobra to stop all movement immediately.
Instantaneous direction change:
To instantaneously change direction, simply press in any direction for at least 1 Frame, and then press in a different direction on the very next Frame. There must be no gap between holding one direction and holding the next direction, or this technique will not work. Furthermore, if the Cobra is moving to the right at the right edge of the screen (or vice versa) and the screen is scrolling, the Cobra cannot instantaneously begin moving to the left. In such a circumstance, the Cobra must first stop all left or right movement before then moving in the opposite direction. The "instantaneous stop" technique can greatly assist with this, requiring only 2 additional Frames to begin moving in the opposite direction.
Prevent damaging explosions when a Barrier is destroyed:
Normally when a Barrier is destroyed, up to 4 animated explosion sprites are spawned in the space previously occupied by the Barrier. The animation lasts for 29 Frames. If the Cobra collides with one of these explosions, it will take 9 Hit Points of damage--certain destruction. Obviously, this presents a problem from a TAS perspective, as the explosions cannot be avoided without sacrificing Frames to do so. Mercifully, If the screen is scrolling when a Barrier is destroyed, these explosion sprites will fail to spawn, and the Cobra can advance unimpeded.
Avoid damaging explosions when a Barrier is destroyed:
It is generally preferred to use the above technique to prevent the damaging explosions from spawning, but it is not always possible/favorable/necessary to do so. Under such circumstances, it may still be possible to manipulate where the explosions appear. When a Barrier is destroyed, up to 4 animated explosion sprites are spawned in the space previously occupied by the Barrier. The sprites spawn in a pattern beginning just below the point where the Cobra's last projectile hit it. As such, the explosions can be manipulated to spawn higher or lower on the screen, by firing the last projectile at a higher or lower point, respectively, on the Barrier. These explosions can also be manipulated to spawn farther light or right on the screen, based on the Cobra's proximity to the target when the last projectile is fired. Other than this technique, the only other alternative is to have too many objects on the screen when the Barrier is destroyed. This is likely more trouble than it is worth, but it does prevent the damaging explosions from spawning.
Save Hostages more quickly:
When a projectile from a Missile makes contact with an enemy or surface, a small explosion sprite is rendered for 13 Frames (14 Frames for Firebomb), after which the explosion sprite disappears. Any enemy that collides with this explosion sprite will be damaged for the selected weapon's normal damage. By placing an explosion sprite at the appropriate spot such that an enemy moves toward and collides with it, this can be used to move toward a Hostage spawn point on an earlier Frame. Hostages spawn just 13 Frames after the enemy "guarding" them has taken final damage (1 Frame after its explosion sprite disappears). Often (particularly early in the game) it is impossible for the Cobra to travel the necessary distance to the spawn point to Save a Hostage on the first Frame it appears. As such, moving toward the spawn point as early as possible is more important than destroying the "guarding" enemy as early as possible. In situations where the Cobra must fire and then immediately move up (this applies to virtually every Hostage spawn point), it is sometimes faster to stop the Cobra 1 or 2 pixels lower than what is necessary to hit a target, and then move up and fire (hold Up and press A) on the same Frame, rather than to fire on a Frame and then hold Up on the next Frame.
Save Hostages after Cobra has been destroyed:
When the Cobra is destroyed, it still remains present in the game at the coordinates at which it was destroyed for 111 Frames until the map transition begins. Of course, the Cobra cannot take any action after it is destroyed, but it still possesses some functionality. During these Frames, any Hostage near enough to the Cobra's last location will enter it and be Saved. This saves time in any area where destroying the Cobra is used as a shortcut, compared to Saving the last Hostage before destroying the Cobra. Any enemy that collides with the Cobra's last location during these Frames will be destroyed; this is never actually used, but it's nice to know. :) Because the Depots in the game each provide an extra life, this is easily exploited to maximum advantage.
Bypass transition to Fortress 3 Area 3:
In Fortress 3 Area 2, after capturing Depot 2, the Cobra will automatically move up to Fortress 3 Area 3. However, before this transition begins, the game sets the screen X position before it sets the Cobra's X or Y position. This allows 1 Frame during which the Cobra is displaced on the screen, and can be destroyed if it is within a surface during this Frame. This will cause the Cobra to respawn in Fortress 3 Area 3, without needing to complete the transition. This is manipulated to cause Area 3 to begin 233 Frames earlier, and also cause the Cobra to spawn nearer to Barrier 6.
Forced Liftoff:
If the Cobra is on the same level (Y position) as the surface above which it is flying, the game will force the Cobra upward by 8 pixels if Left or Right is held, even if Up is never pressed. During this Forced Liftoff, the Cobra moves 2 times faster than normal for a period of 2 Frames. For example, the Normal Engine normally moves at 1.5 pixels per Frame, and would thus move at 3 pixels per Frame for 2 Frames during a Forced Liftoff. Using the Normal Engine as an example, the movement pattern during this liftoff is 1-2-1-2-1-2-3-3-1-2, rather than the normal 1-2-1-2-1-2-1-2-1-2, and thus the Cobra can travel 3 extra pixels in the same time compared to a manual liftoff or normal flying. These 3 pixels equate to 2 Frames saved. Unfortunately, this technique does not accelerate the speed at which the screen scrolls. Furthermore, this technique does not work when the Cobra is moving from right to left. The game will still force liftoff, but it will actually delay movement for several Frames, and even force the Cobra backward by a few pixels. Note that even though the Forced Liftoff will not work when the Cobra is moving from right to left (i.e. it will not accelerate horizontal movement), it is still useful for mitigating "The Push".
"The Bounce":
By exploiting the physics of the forced liftoff repeatedly, several Frames can be saved. "The Bounce" provides this opportunity. While flying forward, hold Down and Right against a horizontal surface. Rather than destroying the Cobra when it collides with the surface, the game will force liftoff. Continue holding Down and Right, and the Cobra will appear to "bounce" as the game repeatedly forces liftoff every 8 Frames. Each "Bounce" equates to 3 extra pixels of movement, or 2 Frames saved. As this technique involves using Forced Liftoff, it will not work when the Cobra is moving from right to left, except to mitigate "The Push".
"Reverse Bounce":
If the Cobra is flying backward and pitching up when it collides with the surface beneath it, it will be destroyed. To prevent this, the Cobra's pitch must be level before it collides with the ground:
Approach the surface while flying backward and moving down diagonally.
Release Down for 1 Frame while the value of offset 02FD is from 6 to 3.
Release Right for 1 Frame when offset 02FD=1.
Resume holding Down and Right after their respective 1 Frames of delay.
Done correctly, this will cause the Cobra to "slide" along the surface rather than crashing into it, and also allow an additional Forced Liftoff when the Cobra continues to move along the surface: the "Reverse Bounce". This technique is useful because it allows the Cobra to fly backward for optimum movement efficiency and still save Frames as with "The Bounce". Unfortunately, because advancing input must be interrupted for 1 Frame, the "Reverse Bounce" is only half as effective a time saver as "The Bounce": each "Reverse Bounce" equates to 1.5 extra pixels of movement, or 1 Frame saved. As this technique involves using Forced Liftoff, it will not work when the Cobra is moving from right to left.
"Turning Reverse Bounce":
Normally when the Cobra is moving backward and down and then collides with the surface beneath it, it will be destroyed. However, if the Cobra is in the process of turning around to fly backward, the game forces the Cobra to fly level, allowing it to safely fly backward and down against a surface until the game forces a liftoff: the "Turning Reverse Bounce". Because this requires no interruption of directional input, this technique saves as many frames as the original "Bounce". Each "Turning Reverse Bounce" equates to 3 extra pixels of movement, or 2 Frames saved. Unfortunately, the "Turning Reverse Bounce" cannot be quickly repeated like the other "Bounce" techniques because it requires turning the Cobra around, but it is useful nonetheless. As this technique involves using Forced Liftoff, it will not work when the Cobra is moving from right to left.
"Creeping Bounce":
This technique combines "The Bounce" and "The Creep", allowing the advantage of both techniques to be exploited in conjunction, albeit at a lesser effect than either technique being used independently. While the Cobra is Bouncing, release Left or Right for 1 Frame on the Frame prior to the Cobra being moved backward by "The Push" (as when executing "The Creep"). This lessens the effect of "The Push" somewhat, while still using "The Bounce" to allow for (almost) maximum screen scrolling. This is used in only one situation (and only very briefly) in this TAS, in Stage 5, just prior to rescuing Hostage 1.
"Phantom Bounce":
The most mysterious Bounce of all. This allows the Cobra to execute a Bounce without a surface. This is possible only in 1 area, at the beginning of Stage 5, and only for 1 Bounce. This saves 2 Frames.
"The Push":
When the Cobra is moving in the same direction it is facing, once it has reached the middle of the screen (X 127), the screen will begin scrolling, and the Cobra will be "pushed" backward until it has reached the edge of the screen (X 30 to the left or X 225 to the right). Once the Cobra has reached the edge of the screen, it will resume its normal screen scroll speed. However, if the Cobra is moving in the opposite direction it is facing, its flight speed is always ideal (there is no "pushing"). The game will allow the Cobra to travel past the middle of the screen and all the way to the far edge of the screen.
Mitigate "The Push":
It is occasionally necessary to fly in the direction the Cobra is facing, to scroll the screen in advance of the Cobra to force early spawns and the like. Unfortunately, this means having to deal with "The Push". Thankfully, by exploiting the physics of the "Forced Liftoff", this can be controlled somewhat. During a Forced Liftoff, the game will not "Push" the Cobra backward if it is moving in the same direction it is facing. This is not a continuous effect; "The Push" is only cancelled during the 2 "accelerated" Frames of a Forced Liftoff. Nevertheless, using "The Bounce" technique, "The Push" can be greatly slowed in its effect, even allowing the Cobra to remain as far forward as the center of the screen (around X 127) while flying forward. This means that the Cobra is much closer to enemy targets and Hostages as they scroll onto the screen, thereby saving a substantial number of Frames. This technique mitigates "The Push" while still allowing maximum screen scroll speed.
"The Creep":
It is occasionally necessary to fly in the direction the Cobra is facing, to scroll the screen in advance of the Cobra to force early spawns and the like. However, after the screen has scrolled sufficiently for a target to spawn, the priority switches from scrolling the screen to moving the Cobra closer to the target (or otherwise farther across the screen). Unfortunately, this means having to deal with "The Push". For such a scenario, "The Creep" provides a superior solution for mitigating "The Push". Hold the direction (Right or Left) that the Cobra is facing for 2 Frames, release that direction for 1 Frame, and then repeat. This will allow the Cobra to "creep" forward at a reduced speed without being affected by "The Push". While "creeping" using the Normal Engine, screen scroll speed is reduced to .66 pixels per Frame (66% of normal rate), and Cobra's X speed is reduced to .5 pixels per Frame (33% of normal rate). While this technique does not allow for maximum screen scroll speed while mitigating "The Push", it does have 2 advantages over using "The Bounce": the Cobra does not need a surface on which to "bounce", and the Cobra can maintain forward movement throughout, even beyond the center of the screen (X 127) threshold. This means that the Cobra is much closer to enemy targets and Hostages as they scroll onto the screen, thereby saving a substantial number of Frames.
"The Slide":
if the Cobra is on the same level (Y position) as the surface above which it is flying, the game will force the Cobra upward by 8 pixels if Left or Right is held, even if Up is never pressed. However, this Forced Liftoff can be avoided by simply not entering any Left or Right input while offset 02FD = 1. By holding Left or Right and releasing it each time that offset 02FD = 1 (once per every 8 Frames), the Cobra can "slide" along a horizontal surface. This technique is useful for maintaining the lowest possible position on the screen while still allowing left/right movement. It is used several times throughout this TAS.
Move through solid floor:
This isn't nearly as interesting as it sounds, but it does save several Frames. If the Cobra is in contact with a transition trigger (e.g. the bottom of the hole where a Barrier was destroyed) for at least 1 Frame before the trigger becomes active, the Cobra can move to the left or right, and the game will begin the transition to the next area, even if it pulls the Cobra through a wall or other obstacle (the Cobra is not damaged by this). Even this is very limited. The Cobra must remain at the same Y location as the transition trigger or the transition will not start. And of course, moving too far left or right along the floor will inevitably cause a Forced Liftoff, thereby changing the Cobra's Y position and causing the transition to fail. This is first used on Stage 1 Fortress 2 after destroying Barrier 4 (the green silo).
Projectiles damage remote target:
If a projectile exits from an edge of the screen on the same Frame and at the same Y location that an enemy exits from the opposite edge of the screen, the projectile will "wrap around" to the other side of the screen and damage the enemy. This technique is not used in this TAS.
Projectiles move across the screen twice:
After Start has been pressed to begin turning to face left, fire 2 or more projectiles to the right on the last possible Frame that this can be done before the Cobra has completed turning around. When the Cobra can again be turned to face right, wait for a full cycle of offset 02FD (e.g. at least 8 Frames) to pass. Press Start to turn the Cobra to face right. The first projectile that was fired will "wrap around" the screen. If 2 projectiles exit the screen simultaneously first (e.g. 1 Guns projectile and 1 Missile projectile), both projectiles will "wrap around" the screen. This technique is not used in this TAS.
To complete the game, the Player must Save every Hostage and destroy a Boss in Stage 5 and Stage 6.
This TAS uses the Japanese version of the game. The Japanese version is faster than the US version for the following reasons:
The enemy Depot screen requires 330 Frames in the US version. It has one additional screen of dialog compared to the Japanese version of the enemy Depot screen. Most of the enemy Depot screens require only 275 Frames in the Japanese version because the text is (mostly) in Japanese.
In the US version, all but 2 of the Barriers encountered in Stage 1: Sumatra and Stage 2: Java have substantially more Hit Points than the same Barriers in the Japanese version. These 8 "enhanced" Barriers combined total 52 additional Hit Points in the US version. Obviously, dealing this additional damage would require significantly more Frames, particularly in the early Stages where the Cobra's weaponry is rather feeble.
Other differences between the US version and the Japanese version:
The US version is rather more difficult than the Japanese version. The early Stages particularly have many more enemies, and the enemies are far more inclined to actually fire at the Cobra. Though this would allow for a higher Score, this was not my primary goal.
The Cobra starts the game with 6 Hit Points in the Japanese version of the game compared to only 4 Hit Points in the North American version. These extra Hit Points are not really necessary in this TAS, but it was comforting to know they were there while I was making it.
Stage 1 uses a nicer-looking color palette in the Japanese version. No more pea soup sky! :)
The hero in the US version is General Steven Power. The hero in the Japanese version is General Moses. Gotta give this one to the US version. :)
In the Japanese version, all of the really important text is in English. This is nice for the viewers of this TAS who do not read Japanese, as they will still be able to follow the main points of interest in the game.
Saving Hostages:
A few Hostages spawn simply by approaching near enough to their spawn point, but they are generally guarded by an enemy. When this "guard" enemy is destroyed, Hostages will begin to spawn. After 3 Hostages have been Saved, enemy reinforcements will arrive if there are any Hostages remaining at a spawn point, and the "guard" enemy will respawn. After the reinforcements have been destroyed, the remaining Hostages will begin to spawn. This cycle must continue until all Hostages have been Saved from a particular spawn point.
A Hostage can be instantaneously Saved if the Cobra is near enough to the surface above the Hostage when he contacts the Cobra. In situations where multiple Hostages must be Saved, this saves time compared to waiting for the Hostages to climb the Rope. The Cobra must be 7 pixels or fewer above a Hostage in order to be instantaneously Saved. Of course, the Cobra's X position must be near enough to the spawn point as well, and this requires approaching the Hostage spawn point while flying backward so that the Cobra does not crash into an obstacle. It requires a minimum of 34 Frames to rescue each Hostage.
A Hostage cannot enter the Cobra unless the Hostage's Y position is equal to or greater than the Cobra's Y position (e.g. the Hostage must be level with or below the Cobra). It is possible, particularly with an upgraded Engine, for the Cobra's landing skids to be within a surface on which it rests by 1 or more pixels. Under such circumstances, Hostages will not be able to enter until the Cobra has been moved above the surface on which it rests.
Barriers:
Throughout the game there are many solid surfaces which prevent access to underground Fortresses and the like. These must be removed by meeting a certain prerequisite. Generally, this simply means firing at a particular point on the surface of the barrier itself until sufficient damage has been done, but it may also involve destroying another Barrier entirely, or Saving a certain number of Hostages.
The enemy Depot:
There are many enemy Depots found in the underground Fortresses throughout the game. When a Depot is secured, the Cobra gains upgrades to its components. These upgrades must be enabled in the Sub-Screen. In addition to these various upgrades, securing an enemy Depot also fully restores the Cobra's Hit Points, and provides 1 extra Life. These extra Lives are put to good use throughout the game (see "Using death as a shortcut"). Unfortunately, securing an enemy Depot requires a minimum of 275 Frames, and a minimum of 124 Frames is required to enter and exit the Sub-Screen in order to enable any upgrades. Obviously, this is kept to a minimum in this TAS, and only 3 Depots are secured, one of which needs to be secured anyway in order to advance the game.
Flying backward:
In general, it is faster to fly backward to scroll the screen than to fly forward. Though the Cobra can fly and scroll the screen at the same speed in either direction, scrolling the screen while flying backward requires the Cobra to be at the edge of the screen toward which it is moving. This means that the Cobra is much closer to Barrier targets and transition triggers as they scroll onto the screen. Also, the Cobra can approach 2 pixels nearer to an obstacle (or the edge of the screen) if it is flying backward than it could if the Cobra were flying forward. After the screen has started scrolling (even by just 1 pixel) and the Cobra is moving forward, turning the Cobra around to fly backward will waste several Frames. The Cobra must be turned around prior to reaching the middle of the screen to prevent any "premature" scrolling, and ensure optimum efficiency of both scrolling and the Cobra's movement. If the Cobra is moving in the same direction it is facing with the screen scrolling and then turns around to fly backward, it will still be subject to "The Push" for 16 Frames until the game is satisfied that the Cobra has fully turned around and resumes normal movement.
Turn around/Pitch:
Offset 02FD indicates the delay before the Cobra can turn to face the opposite direction by pressing the Start button. This value counts down once per Frame from 8 to 1 in a repeating cycle. The value indicates for how many Frames the Start button must be held down before the game will register it. Though the Start button may be held down until the value cycles down to 1 and then back to 8, the same effect can be achieved by simply pressing the button for 1 Frame when the value is 1. Note that if the Cobra is pitching up or down when the Start button is pressed, 8 additional Frames are required before the Cobra will begin to turn around. For the Cobra to fully turn around requires 32 Frames (4 cycles of offset 02FD). The Cobra's sprite turns around in just 19 Frames, but in some respects the game does not consider this transition complete until 32 Frames have elapsed. During these 32 Frames, the Cobra cannot be turned around again. It also makes possible the "Turning Reverse Bounce". Note that if Left or Right is pressed, and then Left and Right are both released on the same Frame that the Start button is pressed, the Cobra will drift Left or Right for 10 Frames, and be unable to stop or change direction during these Frames.
Offset 02FD also indicates the delay before the Cobra's pitch will change if Left or Right directional input is entered. Just as for turning the Cobra around, The value indicates for how many Frames Left or Right directional input must be entered before the game will register it. Also as above, when the value is 1, directional input need only be entered for 1 Frame to achieve the desired effect. If it is necessary to level the Cobra, Left/Right directional input must either be released, or pressed in the opposite direction of the pitch, while the value is 1.
"Internal" Lag Frames:
If 4 or more objects are present on the screen, the game may generate "internal" Lag Frames as needed to compensate. This is particularly likely while the Cobra is moving, the screen is scrolling, and/or when the objects in question are diagonally-moving projectiles and flying enemies. Being that this is a TAS, the screen should be constantly scrolling, and not every enemy can be destroyed immediately, only 1 option remains apart from destroying an enemy on a later Frame: minimize the Cobra's movement. What this means in practice is flying horizontally while multiple objects are on the screen, and not pressing Up or Down on the same Frame that a weapon is fired. During an "internal" Lag Frame, no input can be entered. Often, the game is able to compensate for this appropriately. For example, if the screen was supposed to scroll to X 10 on Frame 100, but instead remained at X 9 due to an "internal" Lag Frame, the game would then nudge the Cobra over to X 11 on Frame 101. However, if 2 or more "internal" Lag Frames are generated in sequence, time may be lost as with any "normal" Lag Frame. Even during an "internal" Lag Frame where movement is compensated, it can be a nuisance to be prevented from firing the Cobra's weapons. The emulator does not register these "internal" Lag Frames, they are all managed by the game itself; this makes them eminently more difficult to identify and remove.
"Rogue" input Frames:
Many of the screen transitions in the game contain "rogue" non-Lag Frames interspersed throughout the Lag Frames of the transition. Some of these "rogue" Frames allow input to be entered. Doing so allows the Cobra to start moving a bit earlier, or allows the Sub-Screen to be entered earlier, thus providing a small speed advantage. This also applies to transitions which do not use Lag Frames, such as a vertical scrolling transition into a Fortress. This type of transition may allow input 1 or 2 Frames prior to the transition being fully completed. Occasionally, only vertical or horizontal input may be allowed. In this situation, it is possible to "unlock" the other direction of input by pressing Left+Right for 1 Frame to unlock horizontal input, or by pressing Up+Down for 1 Frame to unlock vertical input, and then pressing in the desired direction.
Pitch up while flying forward:
Normally, the Cobra will pitch down when it is flying forward, and pitch up when it is flying backward (like any typical helicopter). However, by holding Left+Right, the Cobra will pitch up while flying forward. Unfortunately, this only works while moving from right to left. This is (briefly) used purely for entertainment purposes.
If an enemy is destroyed before it has moved sufficiently onto the screen, no points will be added to the Score for its destruction. As such, enemies are not destroyed on the earliest possible Frame, but rather on the earliest Frame which will add to the Score. This ensures that the memory space which an enemy occupies can be replaced as quickly as possible with another enemy.
Hold the B button for 2 Frames, starting on the Frame before Sub-Screen Status (offset 05B1) becomes 0, to skip the introduction screen at the beginning of the game.
Press the A button on the Frame before Sub-Screen Status (offset 05B1) becomes 99, delay for 2 Frames, and then Press the B button to skip the briefing screen between Stages.
Press the A button on the Frame before Sub-Screen Status (offset 05B1) becomes 99 to quickly advance the dialogue screens at the enemy Depot.
On the left half of the Sub-Screen screen, input is only accepted once per each 8 Frames to allow the game time to print up to 8 characters for an item's name. Though input commands can be held down, they need only be pressed for 1 Frame while the Sub-Screen Timer (offset 0097) = 0. On the right half of the Sub-Screen screen, input is accepted on any Frame, except to select Exit (of course). Input is only accepted once per each 8 Frames to select Exit (probably as a safeguard). Though input commands can be held down, they need only be pressed for 1 Frame while both the Sub-Screen Timer (offset 05A3) and the Exit Timer (offset 0097) = 0. This applies also to the "READY!" and "GO!" dialogs during the Sub-Screen exit sequence.
An enemy that has at least 1 Hit Point, after reaching 0 Hit Points, needs to be damaged 1 more time to be destroyed. For example, using Single Guns, 4 shots would be required to destroy a Missile Truck that has 3 Hit Points.
To enter and exit the Sub-Screen requires a minimum of 124 Frames.
It is possible for the Cobra to be destroyed just before the last Hostage is Saved or a Boss is destroyed at the end of a Stage. In this event, the game will proceed to the next stage (or the ending sequence) with no loss of a Life.
If a Stage ends while the Cobra's explosion animation is still on the screen, the animation will continue to play (at a greatly accelerated rate) until the transition to the next Stage begins. Unfortunately, the next time the Cobra is destroyed, the explosion animation becomes stuck in a loop, and it becomes impossible to advance in the game. No other anomalies have been observed regarding this technique, and certainly no useful application has been determined, except perhaps for some mild entertainment.
The Cobra must be 1 pixel above a horizontal surface to safely fly backward over it. Otherwise, the tail boom will clip the surface and the Cobra will be destroyed. It is possible to fly forward at the same level as a horizontal surface, though the game will force the Cobra upward by several pixels after a few Frames.
The screen will not scroll during certain game events. The screen will not scroll again until the timer expires (63 Frames, offset 00DE is the timer).
These events include:
A Barrier being destroyed
Structures rising from the ground in Stage 2: Java
The inferno starting in Stage 3: Borneo
If the Cobra is resting on a transition trigger (e.g. the bottom of the hole where a Barrier was destroyed) on the first Frame that the trigger is active, the game will begin the transition to the next area, even if it pulls the Cobra through a wall or other obstacle (the Cobra is not damaged by this).
If Depot 1 in Stage 1: Sumatra is not captured, the Cobra can land on the space created when Barrier 4 is destroyed to collect the same items (Turbo Engine and Dual Guns).
The screen cannot scroll if the Cobra is in contact with and continuing to move toward an edge of the screen while on the same level (Y position) as the surface above which it is flying. This is why the game will force the Cobra upward by 8 pixels if only Left or Right is held while the Cobra is on the ground at the edge of the screen.
The LX-3 SuperCobra makes a cameo in the arcade game "Double Dragon II - The Revenge", appearing in Billy and Jimmy Lee's garage at the beginning of the game. Come to think of it, they should have taken the SuperCobra on their quest for revenge. :)
The Upgrades
Guns:
Single does 1 Hit Point of damage.
Dual does 1 Hit Point of damage.
ATG does 1 Hit Point of damage. An ATG projectile will move through any target (except a Barrier or Boss), doing 1 Hit Point of damage per each Frame that the projectile is in contact with the target.
Rapid does 1 Hit Point of damage.
No upgrades are collected for Guns in this TAS, as none of them provide a distinct advantage. The Single Guns themselves, however, are used to great effect throughout the game.
3 projectiles (or impact sprites) from the Guns are allowed on the screen simultaneously.
From point-blank range, Guns do about .4 Hit Points of damage per Frame.
A Guns projectile will move along with the screen as it scrolls, in addition to its own movement. The projectile will be slightly accelerated compared to a projectile fired when the screen is not scrolling. This allows the projectile to hit a target on an earlier Frame, to penetrate more deeply into a vertical surface, or to generally cover more area with the projectile.
When a projectile from the Guns makes contact with a Barrier or other surface, a small impact sprite is rendered for 5 Frames, after which the impact sprite disappears. Any enemy that collides with this impact sprite will take 1 Hit Point of damage. If 3 impact sprites are on the screen simultaneously, the Guns cannot be fired until at least 1 of the impact sprites has disappeared. There is no impact sprite rendered when a projectile from the Guns hit an enemy, only when it hits a Barrier or other surface. This impact sprite will actually move along with the screen as it scrolls, allowing it to move along a horizontal surface for a few pixels, or to penetrate more deeply into a vertical surface.
Missile:
Mono does 4 Hit Points of damage. It moves down 12 pixels from the Cobra before launching forward.
If the Cobra is flying level or hovering, it must be 13 pixels above a horizontal surface to successfully fire a Mono Missile, or the projectile will collide with the surface and be destroyed.
If the Cobra is flying backward such that its nose is tilted upward, it must be 15 pixels above a horizontal surface to successfully fire a Mono Missile, or the projectile will collide with the surface and be destroyed.
Twin fires the same projectile as Mono, but allows 2 projectiles to be on the screen simultaneously.
Firebomb does 16 Hit Points of damage. These projectiles fire out from the front of the Cobra in a descending arc, unlike other Missiles. The trajectory of this arc is always the same, regardless of the Cobra's pitch. The explosion sprite looks different than any other Missile weapon (the same graphic as the Cobra's explosion sprite), and lasts for 14 Frames instead of 13. It is the ultimate power in the universe.
Vertical (Homing in the US version) does 4 Hit Points of damage.
Mines do 4 Hit Points of damage. 2 Mines projectiles at a time are allowed on the screen. These projectiles fire out from the front of the Cobra in a descending arc, unlike other Missiles. The trajectory of this arc is always the same, regardless of the Cobra's pitch.
Homing 1 does 8 Hit Points of damage. This weapon will home in on the nearest enemy target, including the damage area of a Barrier or Boss. A Homing 1 projectile moves more slowly than Guns or other Missiles.
Homing 2 fires the same projectile as Homing 1, but allows 2 projectiles at a time to be on the screen.
When a Missile projectile makes contact with an enemy or surface, a small explosion sprite is rendered for 13 Frames (14 Frames for Firebomb), after which the explosion sprite disappears. This explosion sprite will damage enemies that collide with it. The damage is equal to the weapon used. If an explosion sprite (or 2 explosion sprites, depending on which Missile is enabled) is on the screen, the Missile weapon cannot be fired until at least 1 of the explosion sprites has disappeared. Note that there is no explosion sprite rendered when a Missile projectile hits an enemy, only when it hits a Barrier or other surface.
A Missile projectile may penetrate more or less deeply into a surface, depending on the Cobra's X position relative to the surface on the Frame that the projectile is fired. There are other factors that determine this, but the Cobra's X position is the simplest of these factors to manipulate. The difference in penetration may be as great as 4 pixels. This is primarily used with the Firebomb to destroy "guard" enemies on an earlier Frame as they emerge from protective cover.
A Missile projectile will move along with the screen as it scrolls, in addition to its own movement. The projectile will be slightly accelerated compared to a projectile fired when the screen is not scrolling. This allows the projectile to hit a target in front of the Cobra on an earlier Frame, or to penetrate more deeply into a vertical surface. Note that if the projectile is fired in the opposite direction that the Cobra is moving, the projectile will actually hit a target on a later Frame with certain Missiles (e.g. Mono), because of the way the projectile must first descend from the Cobra for several Frames before launching forth.
Engine:
Normal:
Screen X speed is 1 pixel per Frame.
Cobra's X speed is 1.5 pixels per Frame (1-2 pattern).
Cobra's Y speed is 1.5 pixels per Frame (1-2 pattern).
Turbo:
Screen X speed is 1 pixel per Frame.
Cobra's X speed is 1.75 pixels per Frame (1-2-2-2 pattern).
Cobra's Y speed is 1.75 pixels per Frame (1-2-2-2 pattern).
Screen X speed is equal to Normal Engine.
Cobra speed is 16% faster than Normal Engine.
Super:
Screen X speed is 1.5 pixels per Frame (1-2 pattern).
Cobra's X speed is 2 pixels per Frame.
Cobra's Y speed is 2 pixels per Frame.
Screen X speed is 50% faster than Turbo Engine.
Screen X speed is 50% faster than Normal Engine.
Cobra speed is 14% faster than Turbo Engine.
Cobra speed is 33% faster than Normal Engine.
Hyper:
Screen X speed is 1.5 pixels per Frame (1-2 pattern).
Cobra's X speed is 2.5 pixels per Frame (2-3 pattern).
Cobra's Y speed is 2.5 pixels per Frame (2-3 pattern).
Screen X speed is equal to Super Engine.
Screen X speed is 50% faster than Turbo Engine.
Screen X speed is 50% faster than Normal Engine.
Cobra speed is 25% faster than Super Engine.
Cobra speed is 43% faster than Turbo Engine.
Cobra speed is 66% faster than Normal Engine.
Armour:
Armour permanently increases the Cobra's maximum Hit Points by 1.
Rescue:
Rope can attach to a Hostage on a surface up to 58 pixels distant.
The Enemies
Barrier has between 8 and 80 Hit Points.
Pillar (Stage 6 near Barrier 2) has 121 Hit Points and does 2 Hit Points of damage. It is worth 200 points.
SAM does 8 Hit Points of damage and cannot be destroyed.
Crushing Column does 9 Hit Points of damage and cannot be destroyed.
Battleship turret does 2 Hit Points of damage and cannot be destroyed.
Volcanic Ejecta does 2 Hit Points of damage and cannot be destroyed, although destroying Barrier 3 in Stage 4 can cause them to immediately disappear. Volcanic Ejecta also appears at Barrier 2 in Stage 6.
Zeppelin does 4 Hit Points of damage and cannot be destroyed.
Giant Bullet Launcher does 9 Hit Points of damage and cannot be destroyed.
Fireball Launcher does 2 Hit Points of damage and cannot be destroyed.
Fire Chain does 9 Hit Points of damage and cannot be destroyed. These appear only in Stage 6 Area 2.
Ball Chain does 9 Hit Points of damage and cannot be destroyed. These appear only in Stage 6 Area 3.
Several different structures fire seeker missiles. These missiles do 1 damage. However, if the Cobra is hit by one of these missiles during the first several Frames after it has been launched, the missile will not be destroyed by the collision as it normally should. If the Cobra remains in contact with the missile, the effect is analogous to the ATG projectile, doing 1 Hit Point of damage per each Frame that the missile is in contact with the Cobra. A dangerous glitch to the unwary.
Gun Soldier has 0 Hit Points and does 1 Hit Point of damage. It is worth 100 points.
Bomb Soldier has 0 Hit Points. The manual states "throws bombs, which cause twice the damage of bullets". This is not correct. In both versions of the game, the bombs that the Bomb Soldier throws do 1 Hit Point of damage, the same as any normal bullet in the game. It is worth 100 points.
Missile Soldier has 0 Hit Points and does 1 Hit Point of damage. It is worth 100 points.
Helicopter has 0 Hit Points and does 1 Hit Point of damage. However, any Helicopter that emerges from a structure (rather than simply spawning on the edge of the screen) is rather different. This type of Helicopter is first seen in Stage 3: Borneo. These "emerging" Helicopters use missiles rather than guns, which do 2 Hit Points of damage. Their AI is also different. Rather than hover and harass, like other Helicopters, these simply emerge from a structure and fly in a straight line, firing missiles as they move. It is worth 100 points.
Speed Fighter has 0 Hit Points and fires both guns and missiles. The guns do 1 Hit Point of damage, and the missiles do 2 Hit Points of damage. It is worth 150 points.
Jet Fighter has 0 Hit Points and fires both guns and missiles. The guns do 1 Hit Point of damage, and the missiles do 2 Hit Points of damage. It is worth 150 points.
Gun Boat has 1 Hit Point and does 2 Hit Points of damage. It is worth 200 points.
Mobile Cannon has 0 Hit Points and does 1 Hit Point of damage. It is worth 150 points.
Stationary Cannon does 2 Hit Points of damage. It is worth 100 points.
Anti-aircraft Gun has 3 Hit Points and does 2 Hit Points of damage. It is worth 200 points.
Missile Truck has 3 Hit Points and does 1 Hit Point of damage. It is worth 150 points.
Missile Tank has 3 Hit Points and does 2 Hit Points of damage. It is worth 150 points.
Submarine has 3 Hit Points. It is worth 200 points.
Mini-Destroyer has 3 Hit Points and does 2 Hit Points of damage. It is worth 200 points.
Super-Destroyer has 5 Hit Points and does 2 Hit Points of damage. It is worth 200 points.
Super Tank has 7 Hit Points and does 1 Hit Point of damage. It is worth 200 points.
Tank has 7 Hit Points and does 1 Hit Point of damage. It is worth 200 points.
Tank Car has 7 Hit Points and does 1 Hit Point of damage. It is worth 200 points.
Missile Car has 7 Hit Points and does 2 Hit Points of damage. It is worth 200 points.
Memory addresses
03BB The Cobra's Hit Points
0013 Screen scroll X position
02EB The Cobra's X position
02E7 The Cobra's Y position
05BF Hostages saved
0088 Hostage attachment status
02FD Turn around/Cobra pitch timer
05B1 Sub-Screen status
05A3 Sub-Screen timer
0097 Sub-Screen select/Sub-Screen exit timer
05B9 Score 1/2
05BA Score 2/2
02D0-02D9, 048C-048E Enemy Hit Points
Stage 1: Sumatra
Hostages: 20
Barrier 1 in the US version has 24 Hit Points. (+12)
Barrier 1 in the Japanese version has 12 Hit Points.
Barrier 2 in the US version has 16 Hit Points. (+8)
Barrier 2 in the Japanese version has 8 Hit Points.
Barrier 3 in the US version has 28 Hit Points. (+12)
Barrier 3 in the Japanese version has 16 Hit Points.
Barrier 4 in the US version has 16 Hit Points. (+4)
Barrier 4 in the Japanese version has 12 Hit Points.
The Guns can attack from a lower trajectory than the Mono Missile because the projectile fires on a direct line from the nose of the Cobra. This means that a Helicopter that spawns lower on the screen can be destroyed on an earlier Frame with the Guns than with the Mono Missile. This is also useful when it is necessary to fire over an obstacle on the earliest possible Frame.
The Depot in this Stage provides the Turbo upgrade for the Engine. It would require 458 Frames total to secure the Depot and enable the upgrade in the Sub-Screen. However, the speed advantage that the Turbo Engine provides is not sufficient to offset the Frames required to collect and enable it before the Cobra reaches the next Engine upgrade. In testing, the TAS with the Turbo Engine enabled arrived at the next speed upgrade 229 Frames later than the TAS which did not collect the Turbo Engine. As such, this upgrade is ignored in this TAS.
Stage 2: Java
Hostages: 28
Barrier 1 in both versions has 28 Hit Points.
Barrier 2 in the US version has 20 Hit Points. (+4)
Barrier 2 in the Japanese version has 16 Hit Points.
Barrier 3 in the US version has 20 Hit Points. (+4)
Barrier 3 in the Japanese version has 16 Hit Points.
Barrier 4 in both versions has 30 Hit Points.
Barrier 5 in the US version has 20 Hit Points. (+4)
Barrier 5 in the Japanese version has 16 Hit Points.
Barrier 6 in the US version has 20 Hit Points. (+4)
Barrier 6 in the Japanese version has 16 Hit Points.
Depot 1 provides Firebomb and Super Engine. This might be the luckiest break in the TAS: the game's most powerful Missile upgrade, and the fastest Engine to get to the Hyper Engine, together in the same Depot! The speed advantage of the Super Engine is more than enough to offset the Frames required to collect and enable it.
Depot 2 provides Armour and Vertical Missile. If Depot 2 is not captured before Stage 2 is completed, Armour will be provided by the next Depot that is captured. Note that under such circumstances, Vertical will not be provided. Also, there is no message indicating that Armour has been added to the Cobra's inventory.
6 Frames before the transition to Stage 2 is completed, there is a single non-Lag Frame during which input can be entered. Strangely, pressing Right during this Frame will cause the Cobra to move up and backward 2 pixels. However, pressing Left during this Frame will cause the Cobra to move up 2 pixels and forward 1 pixel, thus providing a small speed advantage.
When entering Fortress 1, a Missile Tank normally appears when the automatic scrolling into the area has ended. However, if the right edge of the screen is within a few pixels of the Missile Tank's spawn point, the Missile Tank will fail to spawn. The screen must be scrolled far enough to the right that the Missile Tank's spawn point is on the screen, but just barely so. In this example, the Missile Tank's spawn point was at screen position X 193. Entering the area from locations X 193 through X 207 all prevented the Missile Tank from spawning, but from locations X 208 and beyond, the Missile Tank would spawn normally.
Stage 3: Borneo
Hostages: 27
Barrier 1 in both versions has 40 Hit Points.
Barrier 2 in both versions has 24 Hit Points.
Barrier 3 in both versions has 24 Hit Points.
Barrier 4 in both versions has 10 Hit Points.
Barrier 5 in both versions has 40 Hit Points.
Barrier 6 in both versions has 24 Hit Points.
Barrier 7 in both versions has 24 Hit Points.
Entering Right or Left directional input on the first possible Frame of this Stage will cause the Cobra to spawn 3 to 4 pixels lower on the screen than normal (Y position 154 or 155 instead of Y position 151). This places the Cobra about half within the "floor" of the helipad. This will require an extra Frame or 2 for the Cobra to move clear of the helipad, but it is still faster to enter input on the first possible Frame than to wait the extra Frames for the Cobra to spawn at the correct location.
Hostage 1 must be Saved before Hostage 2 will spawn. Saving Hostage 2 requires the Cobra to backtrack a bit. This cannot be avoided.
The Hostages in Fortress 1 cannot be Saved instantaneously because the Cobra cannot approach near enough to the spawn point without being destroyed. This requires 49 additional Frames per each Hostage. This time is occupied with some dancing. Thankfully, this is the only Hostage spawn point in the game that cannot be safely approached.
Depot 1 provides Hyper Engine, Mines, and Ladder. This requires 328 Frames in the Japanese version. It has one additional screen of dialog compared to any other enemy Depot in the game due to the number of upgrades. The speed advantage of the Hyper Engine is more than enough to offset the Frames required to collect and enable it. After enabling it, its power and control are briefly demonstrated with some daredevil flying.
Barrier 4 is the stack of crates just beyond Barrier 3 and Depot 1. Strangely, this Barrier can actually be avoided without destroying it, but the gap the Cobra must move through has a clearance of just 1 pixel. As though the developers were just waiting for someone to come around to TAS this... Regardless, in this TAS, the Cobra both clears the gap and destroys the Barrier at the last possible moment.
A blazing inferno engulfs the area. The Cobra briefly hesitates before plunging straight through the flames.
Stage 4: South China Sea
Hostages: 29
Barrier 1 in both versions has 26 Hit Points.
Barrier 2 in both versions has 48 Hit Points.
Barrier 3 in both versions has 80 Hit Points.
Barrier 4 in both versions has 16 Hit Points.
Barrier 5 in both versions has 26 Hit Points.
Barrier 6 in both versions has 26 Hit Points.
Depot 2 provides Super Armour. This Depot must be captured in order to advance the game.
After capturing Depot 2, the Cobra will automatically move up to Fortress 3 Area 3. However, before this transition begins, the game sets the screen X position before it sets the Cobra's X or Y position. This allows 1 Frame during which the Cobra is displaced on the screen, and can be destroyed if it is within a surface during this Frame. This will cause the Cobra to respawn in Fortress 3 Area 3, without needing to complete the transition. This is manipulated to cause Area 3 to begin 233 Frames earlier, and also cause the Cobra to spawn nearer to Barrier 6.
Stage 5: Siam
Hostages: 7
Barrier 1 in both versions has 55 Hit Points.
Boss in both versions has 48 Hit Points.
During the first several Frames of this Stage, the game considers the Cobra to be resting on a surface, though there is none. This allows the Cobra to do 1 "Phantom Bounce", thereby saving 2 Frames.
If the transition to Stage 5 Area 2 is triggered while flying backward, and then if Left is pressed during any of the first 6 Frames after the transition has completed, a Fire Chain will spawn at one of various locations on the screen. Normally, this obstacle appears only in Stage 6. A dangerous glitch for the unwary.
The enemy Depot provides 3-Way Gun and Hyper Armour.
The Boss of this Stage has 48 Hit Points and does 2 Hit Points of damage with its fireballs.
Stage 6: Enemy Headquarters
Hostages: 0
Barrier 1 in both versions has 48 Hit Points.
Barrier 2 in both versions has 48 Hit Points.
Boss in both versions has 120 Hit Points.
Barrier 2 is rather unusual. A pillar rises and falls from the floor, causing volcanic ejecta to rain down. The pillar has 121 Hit Points and does 2 Hit Points of damage. Destroying the pillar will cause the volcanic ejecta from appearing, but it is dangerous and unnecessary to do so. The real target, however, is the small red turret(?) above and to the right of the moving pillar. When the turret is hit for 49 damage, the Barrier is removed, the volcanic ejecta stops, and the pillar begins taking 1 Hit Point of damage per Frame. The sprite of the turret and pillar are not removed, though the Cobra can now move through them. After the pillar runs out of Hit Points, it is destroyed. Of course, this TAS does not wait around for this to happen.
The Missile Tank just prior to the final Boss is destroyed on a later Frame than necessary so that an Anti-aircraft Gun spawns instead of another Missile Tank. The Anti-aircraft Gun is worth 50 points more than the Missile Tank.
The final Boss has 120 Hit Points and does 9 Hit Points of damage with its fireballs.
The last Frame of input is on Frame 36619.
The final Score is 40,150 points.
This TAS reaches a point equivalent to the last Frame of the WIP by Titus Kwok 1,042 Frames earlier (though the WIP is using the US version of the game, and is unoptimized):
Forum/Topics/5067
This TAS completes the game in a bit more than half the time of the fastest completion of this game that I could find on the internet.
feos: Accepting for Moons.