Long story short, I want to know the math behind Strafe Jumping (and any other odd ways of acceleration), and I'm not sure if such info exists. If it does, could somebody either write the formula down or at least link me to any relevant information?
Reading through the link provided by @pixel above, it appears the reason that strafe-jumping works is actually pretty simple.
Instead of capping the maximum velocity, the authors of Quake/CS cap the net-acceleration of the player such that the velocity in the acceleration's direction will not exceed the max velocity. This means that, if you accelerate in a direction other than the direction you want to move in, it is possible to exceed the maximum velocity.
I'm not sure why they didn't simply cap the maximum velocity itself, but since that is the obvious solution and almost certainly the one they tried first, they must have had a good reason to change it.
-
1It's kinda confusing to use 'max velocity' when what you're saying implies that there is no max velocity, except for the direction that you 'want to move in'. What do you mean by 'want to move in' - the direction you are facing? The direction your are moving with WADS? – Sadly Not Jul 20 '12 at 23:06
-
@SadlyNot: No, max velocity is exactly what I mean. They cap the acceleration on a frame-by-frame basis in an attempt to cap the velocity, but that does not work as they likely expected. By "direction you want to move in," I mean the direction you will be moving in, after the acceleration-vector is added to the velocity. This is separate from both the direction you're facing and the direction you're accelerating (aka "direction you're moving with WASD") – BlueRaja - Danny Pflughoeft Jul 20 '12 at 23:41
-
-
1@ChaosPointDK: "net" means "total." It means the combined acceleration caused by all forces (holding "forward," holding "right," gravity, friction) – BlueRaja - Danny Pflughoeft Jul 21 '12 at 21:09
-
1Great answer! Re: "I'm not sure why they didn't simply cap the maximum velocity itself" -- The usual reason to avoid this is that you want other forces to be able to accelerate you above the max running speed, whether it's for rocket jumping, jump pads, or other external forces. – Jibb Smart Dec 14 '18 at 6:54
counter-strike
andcounter-strike-source
tags, since this technique is commonly done in both of those games as well, and works exactly the same way. This should open the question to a broader audience. – BlueRaja - Danny Pflughoeft Jul 20 '12 at 22:45