Patch:Bloogstar Rocket
This page deals with the Keen 6 map obstacle known as the Bloogstar Rocket. It requires Keen to have an object, (the Bloogstar Rocket Pass) to use it. Like most Keen 6 map objects its interaction with Keen revolves around text boxes that appear when Keen contacts it. It is thus worth checking Patch:Keen Galaxy Text Windows.
This page is divided up into two sections, the first deals with the Rocket's text window, which appears when Keen contacts it on the map without a card. The second section deals with the Rocket's sprite properties, how the Rocket sprite itself works.
Text window
If Keen touches the Rocket sprite without a passcard a sound plays and a window appears. This window has an image of Keen in it, which must be cached then displayed a certain number of pixels from the left of the window. Two variables govern its size and a third the location of the window's text.
Keen 6 item map texts
#Window picture
%patch $F6F3 [$0023W] #Cache Keen's head
%patch $F720 [$0023W] #Display Keen's head
%patch $F72F [$0030W] #Rightwards location of Keen's head bitmap
#Window size
%patch $F710 [$0008W] #Window height
%patch $F714 [$001AW] #Window width
#Text called from
%patch $F745 [$23BBW]
#Text
%patch $330EB "The door makes a loud" $0A
"blooping noise." $0A
"It says," $0A
$22 "Passcard required" $0A
"for entry." $22 $00
Window sound
As noted above a sound plays when the window appears. This can be silenced.
Keen 6 item map texts
#Keen tries to use rocket without passcard sound
%patch $F756 [$0E]
#Don't play Keen tries to use rocket without passcard sound
%patch $F755 $EB $0A
Rocket sprite
Sprite Actions
Some of the Rocket's actions are poorly defined. The first action is the Rocket sitting still on the map, while the next two are the Rocket moving, a two-action cycle. The last action involves an invisible Keen being carried along with the Rocket. (This seems to work much like the Satellite except that Keen can't be seen.)
The Rocket is spawned sitting still. It will do nothing until Keen touches it while possessing a Rocket Pass. When that happens it will switch to the first frame of its flying loop. The flying loop is two actions long and continues until the Rocket lands. At that point it turns back into a sitting Rocket.
When Keen touches the Rocket with a Rocket Pass he too changes, into the 'riding' Keen. Riding Keen is dragged along with the Rocket, but does so invisibly. When the Rocket lands he transforms back into regular Keen once more.
Actions: $1B08W #Rocket sit $1B26W #Rocket flying $1B44W #Rocket flying $1B62W #Keen riding Rocket
Sprite actions
#Spawn Rocket
%patch $F6C3 [$1B08W]
#Sitting Rocket does nothing
%patch $32854 [$0000W]
#Rocket starts flying when Keen touches it
%patch $F7AC [$1B26W]
#Flying Rocket loop
%patch $32872 [$1B44W]
%patch $32890 [$1B26W]
#Rocket lands and sits
%patch $F95C [$1B08W]
#Keen transforms into riding Keen
%patch $F7CD [$1B62W]
#Keen riding Rocket
%patch $328AE [$0000W]
Sprite Behavior
The main behavior involved is the Rocket flying. This is what causes it to go between its destinations and to take Keen with it. The only other behavior is that of Keen waiting, which simply changes the Rocket's sprite type to 1 so he won't interact with anything during the trip.
Behaviors: $0EFC085DRL #Rocket fly $0EFC0711RL #Keen riding Rocket
Sprite behaviors
#Rocket sit
%patch $32848 $00000000L
#Rocket fly
%patch $32866 $0EFC085DRL
%patch $32884 $0EFC085DRL
#Keen riding Rocket
%patch $328A2 $0EFC0711RL
Keen wait behavior
This is the complete code for Keen's waiting behavior. It does nothing by change the Rocket's sprite type to 1 so that it won't interact with anything during the trip.
Sprite behaviors
#Keen ride Rocket behavior
%patch $F6D1 $55 $8B $EC $56 $8B $76 $06 $C7 $44 $04 [$0001W] $5E $5D $CB
Speed and Jump Height
The Rocket has no sprite action related speeds, its speeds are set elsewhere and cannot yet be patched.
Sprite speeds
#Rocket sit
%patch $32844 [$0000W $0000W]
#Rocket fly
%patch $32862 [$0000W $0000W]
%patch $32880 [$0000W $0000W]
#Keen ride Rocket
%patch $3289E [$0000W $0000W]
Sprite Collision
Sprite interactions are very important to how the Rocket functions. The first, used by the sitting Rocket, is what activates the text window or rocket trip. The flying Rocket has another interaction, that interacts with Keen, pulling him along with the Rocket
Sprite collisions
#Rocket sit
%patch $3284C $0EFC0720RL
#Rocket fly
%patch $3286A $0EFC082ERL
%patch $32888 $0EFC082ERL
#Keen ride Rocket
%patch $328A6 $00000000L
Flying Rocket interaction code
This is the flying Rocket's interaction code; it reacts to Keen's sprite type and causes him to be pulled along $0100W below the Rocket's sprite. (If Keen is pulled so far behind that he's not touching the Rocket anymore, he'll get left behind and be stuck.)
Flying Rocket interaction code
#Flying Rocket interaction code
%patch $F7EE $55 $8B $EC $56 $57 $8B $7E $06 $8B $76 $08 $83 $3C [$02] {$75} $1B
$8B $45 $0A $89 $44 $0A $8B $45 $0C $05 [$0100W] $89 $44 $0C $FF
$74 $1C $56 $9A $08F41297RL $83 $C4 $04 $5F $5E $5D $CB
Animations
Only the flying Rocket truly animates, with a speed of 8 ticks between each action. The sitting Rocket and riding Keen actions have no need to animate. Note that riding Keen has no set animation, this makes him invisible as he's carried along. If he is given an animation then he will be visible during his trip.
Sprite animations
#Rocket sit
%patch $32838 $00D2W $00D2W
%patch $32842 $0000W #Animation speed
#Rocket fly
%patch $32856 $00D3W $00D3W
%patch $32860 $0008W #Animation speed
%patch $32874 $00D4W $00D4W
%patch $3287E $0008W #Animation speed
#Keen ride Rocket
%patch $32892 $0000W $0000W
%patch $3289C $0000W #Animation speed
Sprite-tile interaction
None of the Rocket actions need to interact with tiles in any special way, so they all use a general 'display sprite' code.
Sprite tile interactions
#Rocket sit
%patch $32850 $08F4180ARL
#Rocket fly
%patch $3286E $08F4180ARL
%patch $3288C $08F4180ARL
#Keen ride Rocket
%patch $328AA $08F4180ARL
Action type
The flaying Rocket needs to animate regularly but react quickly, so both of those actions are type 3. The sitting Rocket and riding Keen actions need to react quickly but don't move and so are type 2.
Sprite action types
#Rocket sit
%patch $3283C [$0002W]
#Rocket fly
%patch $3285A [$0003W]
%patch $32878 [$0003W]
#Keen ride Rocket
%patch $32896 [$0002W]
Deprotect and stick to ground
The Rocket has no need for either of these variables and so has a value of 0 for both in all of its actions.
Sprite deprotect, stick
#Rocket sit
%patch $3283E [$0000W $0000W]
#Rocket fly
%patch $3285C [$0000W $0000W]
%patch $3287A [$0000W $0000W]
#Keen ride Rocket
%patch $32898 [$0000W $0000W]