This page is a brief tutorial on how speed works in the Commander Keen games and how speed patches can be created. A related tutorial page is Patch:Sprite speed, patches involving game speed can be found at Patch:Game Speed.
Speed is distance covered divided by time taken, therefore there are two ways of controlling speed, namely working with distance or time. The first type of patch is he more common and involves patching the distance something moves over some cycle of time. This is almost indistinguishable from actual speed. These speeds are usually in pixels (16ths of a tile) or 16ths of a pixel (256ths of a tile.) with 'positive' speeds ($0000W-$7FFFW) being right or down and 'negative' speeds ($8000W-$FFFFW) being left and right. There are of course exceptions, notably for sprites. A notable feature of these patches is that values closer to zero make things slower.
The other type of speed patch involves patching the time between moves of a fixed distance. An example is some Keen Galaxy sprites which move a fixed distance every time they animate, so making them animate faster makes them move faster too. A notable feature of these patches is that negative values or zero (Infinite speed) cannot be used and that making the values closer to zero makes things speed up.
The second kind of speed patch also applies to things we think of as having a speed that do not move, such as how fast tiles aniamte or how fast the game plays.
It is possible to patch speeds in decimal, like all patches, which may be simpler for newer modders. A speed of +-10 looks better than $000AW\$FFF6W. However values of 0-256 patch only one byte, which can cause problems. Otherwise patching speeds is quite simple, both action and normal speeds require a simple two byte patch.
|Patch: Keen 1|
%patch $1A1C $FFC4W
This patch changes the speed of the pink shot in Keen 5 It's speed can be altered with other patches, but simply changing the animation speed will alter how fast it moves. Notice that negative values cannot be used and decreasing the value makes the shot move faster.
|Patch: Keen 5|
This patch alters how fast tiles animate in Keen 3. Doubling this value will halve the tile animation speed. Only values of 1 or greater are valid.
|Patch: Keen 2|