Bunnyhopping from the Programmer's Perspective
1mon 6d ago by sopuli.xyz/u/supersquirrel in longreads@sh.itjust.works from adrianb.io"Bunnyhopping" is an exploit of a very popular bug in games like Quake III Arena, Half-Life, and Counter-Strike. Bunnyhopping, or bhopping for short, allows a player to exceed the game-defined speed limit. It has created entirely new methods of play and allows very exciting, fast-paced emergent gameplay. As a decidedly skill-based mechanic, competitive players love bhopping because it is so hard to master. Thus, it may be useful to you as a game developer to "implement" bunnyhopping into your game. The purpose of this article is to define what bunnyhopping is, why it is important to consider as a game developer, and how to implement it mathematically into your FPS movement code. All code examples are open-source and free to use, as always.

Vc = The current velocity before any calculations
Vw = The direction that the player wants to move in (the so-called wish direction).
Vp = Vc projected onto Vw. Keep in mind that we are only considering magnitude in this calculation, so the direction of the projection doesn't matter.
Va = The acceleration to be added to Vp. The magnitude of this acceleration is server-defined.
Vmax = The server-defined maximum velocity. If Vp + Va exceeds this, then Va is truncated
A good explanation but I am still not totally satisfied, I want a really nice explanation of how the movement in Quake is the result of a basic "error" in understanding how vectors map onto each other in a geometric sense.
I like this article linked in the original article, though you have to access it from the Wayback Machine.
https://web.archive.org/web/20141224180047/funender.com/quake/articles/strafing_theory.html
There are two air 'modes' involved in single-beat strafing, one being a mirror image of the other. In both modes, the player is orientated at an angle to the direction of travel. We shall call this angle theta, θ. At the same time, the player is holding Forwards and either Left Strafe for the left mode, or Right Strafe for the right mode. This results in the following situation.

The black arrow is the velocity vector, which illustrates the direction in which the player is currently moving.
The blue arrow is the orientation of the player (the direction in which you are looking).
The red arrow is the acceleration vector.
To perform the technique, the player quickly switches between modes (called an 'air-change') and continues alternating in this fashion by air-changing at (usually) regular intervals, usually in time with a jump.