As noted above, Mines use the Platform behavior, and as such the only ways to change their speed is to give them a new behavior or alter the speed of all moving Platforms. The Mine's animation motion does not count at all while it is using the moving Platform behavior.

The Underwater Mines collision is simple, when Keen hits it, it explodes and kills him.

Collision values

The Underwater Mines uses its own collision which, when Keen hits it, transforms the Mine into an exploding Mine and kills Keen. Exploding Mines have no collision. (Are harmless, but Keen is already dead by then.)

Patch: Keen 4 collision values

%patch $32714 $11A20D86RL

#Moving

%patch $32732 $00000000L

#Exploding 1

%patch $32750 $00000000L

#Exploding 2

Collision code

This is the complete code for the Mine's sprite collision. It checks for Keen's sprite type and, if found, does several things. Firstly it changes its action to that of an exploding Mine. Secondly it plays sound $25 and finally it runs the 'kill Keen' code.

There is little to say about Underwater Mines animations, there are three, one for the moving Mines and one for each of the two exploding Mine frames. All actions use the same animation no matter what direction they move in. The animation speeds of the exploding mine control how long it is visible for.

The Mine uses a generic 'appear' tile collision and will simply bump into tiles unless prevented from doing so by 'B' sprites, like Moving Platforms are. This can be used to make Mines that are sitting still.

Only partial spawn code is available for the underwater Mines. All four types of mine use the same initiation code. In the initiation code notice the Mine cache being set ($C7 $06 $CB7FW $0001W.) The highlighted blue value defines the first infoplane value that is a mine. (This is $FFFFW - $FFBBW = $44 or 68.) This is part of what differentiates the different mine spawns from each other. Note that there are no up Mines in the default Keen 4 game, so their icon is absent even though it still works.

In the spawning code the last blue highlighted value is the sprite action the sprite uses as it proceeds to act in-level. $C7 $02 $xxxxW sets the sprite activity; in this case 'always active', so Mines will keep moving even when offscreen. $C7 $07 $xxxxW sets the sprite type, and $C7 $20 $xxxxW sets the foreground value. The Mines' initial directions are read off a list at $11A20 + $0D7EW = $$1279E and the list is $03 + 1 = 4 items long. Each entry is for a line of code following the list. (For example the first entry is for $11A20 + $0D2DW = $1274D.)

The next four lines control initial irection. $C7 $47 $0E $xxxxW is the horizontal direction the sprite starts moving in, either $0001W (Facing right), $FFFFW (Facing left) or $0000W (Neither, never used.) $C7 $47 $10 $xxxxW is the vertical direction and works similarly.