From KeenWiki
Jump to: navigation, search

This page covers patches relating to the Fleex in Keen 6. The Fleex are blue, many-eyed enemies with clawed hands. They are notable as the designers of the Bloog's buildings.

Sprite Type

Fleex use sprite type 10. This is not used by any other sprite type and does not affect any other sprite type either.

Patch: Keen 6
#Fleex sprite type
%patch $11D13 $0A

Sprite Actions

Fleex have a basic action scheme. They are spawned walking and will continue this two frame loop until they randomly chase Keen. Chasing is a four frame sequence that ends with the Fleex walking in Keen's direction.

If the Fleex is shot, it may stun, and remain stunned. If however it has not be hit enough times it will either walk towards Keen or look for Keen, a two step sequence that leads to it chasing in Keen's direction.

$2C78W  #Fleex walking 1
$2C96W  #Fleex walking 2
$2CB4W  #Fleex chasing 1
$2CD2W  #Fleex chasing 2
$2CF0W  #Fleex chasing 3
$2D0EW  #Fleex chasing 4
$2D2CW  #Fleex looking 1
$2D4AW  #Fleex looking 2
$2D68W  #Fleex stunned

Patch: Keen 6
#When spawned
%patch $11D5C $2C78W
#While walking
%patch $339C4 $2C96W %patch $339E2 $2C78W
#Look for Keen (Randomly when walking)
%patch $11D8D $2D2CW
#While chasing
%patch $33A00 $2CD2W %patch $33A1E $2CF0W %patch $33A3C $2D0EW %patch $33A5A $2C78W
#While looking
%patch $33A78 $2D4AW %patch $33A96 $2CB4W
#When shot but not stunned
%patch $11E3C $2C78W
%patch $11E19 $2D2CW
#Look for Keen
#When shot and stunned
%patch $11DED $2D68W
#While stunned
%patch $33AB4 $0000W

Sprite Behavior

The Fleex has two behaviors, walking and looking. The first is used when the Fleex is walking. It makes the Fleex turn in Keen's direction (chase him) and also randomly search. The second is used when searching and makes the Fleex chase Keen after searching.

$11CF0083RL #Fleex walk
$11CF00BCRL #Fleex look for Keen

Patch: Keen 6
%patch $339B8 $11CF0083RL %patch $339D6 $11CF0083RL
%patch $339F4 $00000000L %patch $33A12 $00000000L %patch $33A30 $00000000L %patch $33A4E $00000000L
#Looking for Keen
%patch $33A6C $00000000L %patch $33A8A $11CF00BCRL
%patch $33AA8 $08F41765RL

Fleex doesn't look for Keen, just chases

This patch stops the Fleex from randomly looking for Keen when walking. It simply chases Keen and never stops.

Patch: Keen 6
#Fleex just chases Keen
%patch $11D82 $EB

Seeking Keen

The Fleex will chase after Keen when walking. It will also randomly go to a 'looking' action, which also seeks Keen.

Patch: Keen 6
#Seek Keen when walking:
%patch $11D9F $FFFFW %patch $11DA4 $0001W
#Randomly seek Keen when looking:
%patch $11DC5 $FFFFW %patch $11DC0 $0001W

Stop Fleex chasing Keen while walking

This patch makes the Fleex search for Keen all the time instead of chasing him while walking. This slows it down considerably. (To make the Fleex just walk back and forth you will need to change its behavior to nothing, see below.)

Patch: Stop Fleex chasing Keen while walking
#Stop Fleex chasing Keen while walking
%patch $11D95 $5E $5D $CB

Stop Fleex searching for Keen

This patch stops the Fleex from searching for Keen in any way. This makes it simply chase Keen all the time

Patch: Stop Fleex searching for Keen
#Stop Fleex searching for Keen
%patch $11D80 $24

Speed and Jump Height

The Fleex's speed is defined entirely in its animation motion. Interestingly its motion is the same when walking or chasing, but when chasing it animates (and thus moves) faster.

Patch: Keen 6 Animation motion
%patch $339B4 $0080W $0000W %patch $339D2 $0080W $0000W
%patch $339F0 $0080W $0000W %patch $33A0E $0080W $0000W %patch $33A2C $0080W $0000W %patch $33A4A $0080W $0000W
%patch $33A68 $0000W $0000W %patch $33A86 $0000W $0000W
%patch $33AA4 $0000W $0000W

Sprite Collision

The Fleex has a simple collision, it is deadly and stunnable, taking several shots to defeat.

Collision values

The Fleex always uses the same collision, except when stunned. The Fleex takes four shots to defeat.

Patch: Keen 6 collision values
%patch $339BC $11CF00DDRL
%patch $339DA $11CF00DDRL
%patch $339F8 $11CF00DDRL
%patch $33A16 $11CF00DDRL
%patch $33A34 $11CF00DDRL
%patch $33A52 $11CF00DDRL
#Looking for Keen
%patch $33A70 $11CF00DDRL
%patch $33A8E $11CF00DDRL
%patch $33AAC $00000000L

Sprite strength

The Fleex takes four hits to stun.

Patch: Sprite strength
#Fleex's strength
%patch $11D6F $0004W


The Fleex animations are quite simple; the same frames are used when walking or chasing, but notice the animation speeds are lower (that is, faster animation and faster speed) when chasing. The looking animation speeds govern how long the Fleex pauses while looking.

Patch: Keen 6 Animations
%patch $32450 $00EFW
#Fleex cache start
%patch $324A0 $00F5W
#Fleex cache end
%patch $339A8 $00F1W $00EFW %patch $339B2 $0007W
#Animation speed
%patch $339C6 $00F2W $00F0W %patch $339D0 $0007W
#Animation speed
%patch $339E4 $00F1W $00EFW
#Fleex chase 1
%patch $339EE $0007W
#Animation speed
%patch $33A02 $00F2W $00F0W
#Fleex chase 2
%patch $33A0C $0007W
#Animation speed
%patch $33A20 $00F1W $00EFW
#Fleex chase 3
%patch $33A2A $0007W
#Animation speed
%patch $33A3E $00F2W $00F0W
#Fleex chase 4 (Go to walk)
%patch $33A48 $000AW
#Animation speed
%patch $33A5C $00F3W $00F3W %patch $33A66 $003CW
#Animation speed
%patch $33A7A $00F4W $00F4W %patch $33A84 $003CW
#Animation speed
#Fleex stunned
%patch $33A98 $00F5W $00F5W %patch $33AA2 $0000W
#Animation speed

Sprite positioning

The Fleex spawns 24 pixels or 2.5 tiles down from where it is placed. This is vital for making it walk on the ground and so must be changed if the sprite's height is changed.

Patch: Keen 6
#Spawn height
%patch $11D2F $FD80W
#2.5 tiles down

Clipping and foreground

The Fleex uses a foreground variable of 0, which places it behind foreground tiles, possibly useful when it walks into walls.

Patch: Fleex foreground variable
#Fleex foreground variable
%patch $11D1D $0000W

Probability and randomness

The Fleex has a 50:50 chance of moving right or left when initially spawned.

Patch: Keen 6 randomness
#Chance of spawning moving left
%patch $11D3A $80