Patch:Keen jumping (Dreams)
This page contains patches relating to Keen jumping and falling in Keen Dreams. That is, such things as the sprites used, the speeds and sounds. It does not cover patches relating to gameplay such as those that make levels scroll or change keys. It is divided into sections relating to the various sprite properties the patches involved. Being fluent with various sprite patch pages will help when working with these patches.
Unlike in Keen Galaxy, Keens jumping actions are not so easily separated from his falling actions so both are covered here. Keen's jumping in Keen Galaxy is covered on the page Patch:Keen jumping (Galaxy)
Unlike in Keen Galaxy where there is only one way for Keen to jump or fall, in Keen Dreams Keen uses different animations depending on whether he jumps straight up, or whether he's jumping to the side. Once Keen has 'chosen' a jump he's locked into it; if he jumps up initially but then moves to the side he will not switch to a horizontal jump animation.
There is one situation in which Keen can start jumping vertically. That is when when standing still. There are also two situations where Keen can start jumping horizontally, the first is when walking and the second when jumping off of poles.
Both of Keen's jump/fall sequences are three actions long and look like they should quickly return Keen to standing. However, due to his 'action type' these 'next action' values are triggered in the game's code. So Keen will not return to standing 'automatically' but must be 'triggered' by hitting the ground.
When Keen is crouching on a one-way-up platform and presses the 'jump' key he will jump down in his third vertical action. He will also automatically enter this action after throwing a Flower Power in any direction while in the air.
There are many situations where Keen can go t his third horizontal action (Near enough to 'fall'). The first is when he is on a pole but level with the ground, whereupon he can simply 'walk' left or right off the pole. The second is when he moves down a pole off its bottom. The third and fourth are when he is pushed by a Carrot Courier and Squasher respectively. The fifth occurs when he is standing on ground that vanishes or a moving platform that he's pushed off of. Finally Keen can simply walk off an edge.
Actions: $14D2W #Keen jump vertically 1 $14F0W #Keen jump vertically 2 $150EW #Keen jump vertically 3 $152CW #Keen jump horizontally 1 $154AW #Keen jump horizontally 2 $1568W #Keen jump horizontally 3
|Patch: Sprite actions|
There is only one behavior relating to Keen jumping which is also used when he is falling. It may best be considered a 'Keen in the air' behavior.
|Patch: Sprite behaviors|
Keen's jump speeds and heights are controlled in a complex way. The action speeds are not used.
|Patch: Sprite speeds|
Keen uses his primary sprite collision when jumping and falling. This is the one that allows him to interact with point items and sprites such as the Tomatooth.
|Patch: Sprite collisions|
Keen uses two sets of animations depending on whether he's jumping straight up or horizontally. Each action uses a different animation depending on which way Keen is facing. None of the actions have an animation timer; they are changed in the game's code depending on Keen's movement speed.
|Patch: Sprite animations|
Keen uses a special 'Keen in air' tile collision when jumping and falling. This lets him hit his head on ceilings as well as land on solid ground. It is also used by his shooting in the air actions
|Patch: Sprite tile interactions|
All of Keen's jumping actions are type 2, which allows them to move smoothly through the air and react quickly. However they must be animated in the gamee's code since these types of action don't animate on their own.
|Patch: Sprite action types|
Keen has no need for either of these variables while in the air and so has a value of 0 for both in all of his jumping actions.
|Patch: Sprite deprotect, stick|