Fundamentals of Movement
Although PR2 is a simple platformer, the way your movement works can be quite complex. In this section, I am going to dive into the details of movement to help you better understand the mechanics behind it.
Speed
The speed that you can travel is dependent on the frame rate of PR2. PR2 runs at 27 frames per second.
The slowest you can move is 1 pixel per frame while the fastest you can move is 28 pixels per frame which is the speed limit of PR2.
Blocks are 30 pixels wide, so this is equivalent to 0.9 to 25.2 blocks per second.
Your maximum running speed is determined by your Speed stat.
The formula for your speed is 2 + (Speed ÷ 10) pixels/frame, rounded to the nearest whole number.
With 0 speed, you will only be able to move at 2 pixels/frame.
With 100 speed, you will be able to move at 12 pixels/frame.
Because your speed is rounded, speeds ending in 5, 6, 7, 8 and 9 all offer the same top speed. So you can save a few stat points by using 95-99 speed instead of 100.
An important detail to know is that you will take much longer to reach top speed when you use
speeds ending in 5.
For example, your top speed will be 12 pixels/frame if you use 95 speed, but you will not reach that speed until you have fully accelerated to the maximum speed. This means you will be 1 pixel/frame slower for a few seconds, which is equivalent to using 86-94 speed. So using speeds ending in 5 is discouraged. You are better of spending an extra 1 or 2 stat points to avoid the delay.
Note that this does not happen if you are running to the left. Your top speed will remain 1 pixel/frame slower.
Acceleration
Acceleration controls how quickly you gain speed.
It also impacts your crawling speed and your speed in water. More on these later.
To avoid confusion, there are two different speeds to be aware of:
• Maximum Possible Speed - The fastest speed you can possibly run. Your top speed.
• Maximum Allowed Speed - The fastest speed you can run at the current moment.
While the Speed stat affects your Maximum Possible Speed, Acceleration determines how quickly you can change your Maximum Allowed Speed. When holding Left or Right, your Maximum Allowed Speed increases which results in your actual speed increasing. This is capped by your Maximum Possible Speed.
The more Acceleration you have, the faster your Maximum Allowed Speed increases.
It will drop if you let go of Left/Right, begin crawling or run into a block. In moments like these, you will slow down significantly and be required to accelerate up to speed again.
Interestingly, your Maximum Allowed Speed is not actually tied to your actual speed. It is possible to increase your Maximum Allowed Speed when you are not moving, and even when you are moving in the opposite direction. All you have to be doing is holding Left/Right while not running into any blocks
You can use this to your advantage to reduce the time it takes for you to reach top speed.
In the following examples, the player is using 100 Speed and 0 Acceleration.
1. The player stands on the Arrow Blocks and only begins moving left as they jump at the end. Because of their low acceleration, their movement is very slow and they fail to reach the finish with a single jump.
2. The player stands on the Arrow Blocks briefly before running to the left. By doing this, they are increasing their Maximum Allowed Speed towards the left. As they jump off the Arrow Blocks at the end, they are able to move much more quickly and reach top speed almost instantly since they have built up their Maximum Allowed Speed along the straight.
Jump
The maximum height that you can jump is determined by your Jump stat.
Using the right amount of Jump will allow you to easily perform perfect jumps onto blocks of a certain height which can save you a little bit of time.
Here's how many blocks you can jump up with the following jump stats (with 1.0 gravity):
0 – 1 block
11 – 2 blocks
29 – 3 blocks
44 – 4 blocks
56 – 5 blocks
66 – 6 blocks
77 – 7 blocks
86 – 8 blocks
95 – 9 blocks
Jumping up 4-6 blocks will be enough for most levels. I have rarely needed to use jump values outside that range.
With the above jump values, it takes slightly longer to reach the required height to jump up the number of blocks. So using a little more jump is recommended.
Personally, I use:
46 – 4 blocks
57 – 5 blocks
67 – 6 blocks
Super Jumping
Super jumping allows you to scale up to 13 blocks with a single jump.
The process of super jumping begins before you actually start charging the jump.
To begin charging a super jump, the Down key must be held for about 0.5 seconds (13 frames). You can use this time to continue moving and cover some distance before you come to a stop and begin charging.
You can use this knowledge to mark places in the level where you can start holding the Down key so that you charge your super jump at the perfect moment.
Try it for yourself:
Starter Steps by kinx (5976844)
You have 60 speed and you want to start charging your super jump at the purple dot. When should you begin holding Down?
It takes about 1.4 seconds (39 frames) to fully charge a super jump. However, you do not actually need to charge fully to maximize your height. Releasing the super jump shortly (0.1 seconds/3 frames) before your player turns yellow can still launch you sky high.
Like with regular jumping, every frame that you spend charging a super jump will result in additional height. The smallest possible super jump is enough to get you over 1 block, while the highest super jump can propel you about 13.3 blocks high.
Falling
Holding the Down key while you are in the air will slow down your ascent and accelerate your falling. While your maximum falling speed does not change, accelerating your fall can help shave off time by allowing you to reach an area below you slightly quicker.
Low Jumping
Performing low jumps can add a level of precision to your movement, but they can be difficult to perform, especially if you have high jump stats.
This is where the Down key can also help.
Holding Up + Down together allows you to perform a jump roughly half as high as a standard jump.
Here's how many blocks you can jump up by holding Up + Down with the following jump stats (with 1.0 gravity):
15 – 1 block
46 – 2 blocks
67 – 3 blocks
87 – 4 blocks
Similar to normal jumping, you can still perform fairly decent jumps even if you have a little more jump than listed above.
For example, 20, 50, 70 and 90 jump all work pretty well.
Another way to reliably perform low jumps is to practice frame-based timing.
Your inputs (key presses) are recorded frame-by-frame and the height that you jump is determined by your jump stat and how many frames you held the Up key for, up to a limit.
Tapping the Up key for the shortest possible period of time would be a 1-frame jump. Tapping Up ever so slightly longer would be a 2-frame jump.
1-frame jumps will never be enough to jump up a single block regardless of how much jump you have, but they can be helpful for other things such as carrying speed into crawl spaces.
2-frame jumps allow you to easily perform a 1 block jump if you are using 44 to 67 jump.
Note that you can combine these two techniques together to make things a bit easier for yourself if your frame timing is not the best. My keyboard is not that good at doing 1-frame jumps, so instead, I do a 2-frame jump while holding the Down key to achieve the same result.
Controlling Speed
Holding the Left and Right keys together can allow you to control your speed more precisely.
By holding Left + Right, you will lose speed very slowly, much more so than letting go of the Left/Right key, and preserve momentum in the direction you are running.
This means you can make fine adjustments to your speed, and hence your position which can help shave off time.
1. Catacombs by look (1524183)
I hold Left + Right to slightly reduce my speed on the Up arrows so that I stick to them slightly longer, giving me the height I need to reach the platform.
2. Inertia by JGPrix (6338680)
To fall onto the arrow blocks without bumping into the wall on the right, I reduce my speed slightly by tapping Left + Right. In this instance, I was using a speed ending in 5, so only a very brief tap of the Left key was needed to reduce my speed.
Crawling
You begin crawling when you are sandwiched in a 1 block high gap. When crawling, your speed is reduced but you can limit your losses by using the right combination of speed and acceleration.
Your maximum crawling speed is determined by a combination of your acceleration and speed.
Here's how fast you can crawl with the following acceleration stats:
2 – 1 pixel/frame
29 – 2 pixels/frame
56 – 3 pixels/frame
83 – 4 pixels/frame
Your maximum crawling speed is 4 pixels/frame, which is equivalent to running with 15-24 speed.
Note that you cannot move at all if you have 0 or 1 acceleration.
Your crawling speed is further capped by your speed stat.
Take the lesser of your maximum running speed and your crawling speed based on acceleration, and that will be your maximum crawling speed.
For example, say you have 10 speed and 90 acceleration.
With 10 speed, you can run at 3 pixels/frame. With 90 acceleration, you can crawl at 4 pixels/frame.
The lower of these two is 3 pixels/frame, so that will end up being your maximum crawling speed.
Your speed won't make a difference to your crawling speed if you have 15 speed or more, so this won't really affect you in practice.
Swimming
Like crawling, swimming also relies heavily on acceleration.
While swimming, your speed is entirely dependent on your acceleration.
Similar to running speed, you gain an extra pixel/frame of speed for approximately every 10 additional acceleration you have.
However, your speed in water is 1 pixel/frame slower. This means your minimum speed in water will be 1 pixel/frame, and your maximum speed will be 11 pixels/frame.
Swimming (left) vs Running (right)
Running in water is where your speed comes into play. Your maximum speed is a combination of speed and acceleration, capped at 9 pixels/frame. Like crawling, your maximum speed will be severely limited if either your speed or acceleration are too low. Because of this and the lower maximum speed, you are better off swimming in water instead.