The code behind Quake's movement tricks explained (bunny-hopping, wall-running, and zig-zagging)
Summary
TLDRThis video explores the evolution of player movement techniques in the Quake game series, highlighting three key techniques: zigzagging, wall running, and bunny hopping. These techniques, all stemming from a single piece of code, revolutionized gameplay and influenced the genre. The script delves into the mechanics, explains how players exploit the velocity update rule for speed boosts, and showcases advanced strategies used in tool-assisted speedruns for maximum efficiency.
Takeaways
- đČ Quake's player movement techniques have evolved significantly over the years, impacting the way the game is played.
- đ The earliest trick, zigzagging, involves rapid alternation of strafe keys while moving forward to gain speed.
- đââïž Wall running is performed by strafing into a wall while running parallel to it, another technique for boosting speed.
- đ° Bunny hopping or strafe jumping is a technique that has evolved and is used to maintain speed during gameplay.
- đ All three movement techniques originate from the same piece of code, showcasing the game's influence on the genre.
- đ The 'wishder' is a key concept, representing the player's intended movement direction, formed by combining forward and side vectors.
- đ The player's velocity in the horizontal plane is updated based on the wishder, with vertical velocity calculated through a gravity model.
- đ§ A loophole in the velocity calculation allows manipulation of the current speed, leading to the development of speed techniques.
- đ Friction affects speed, with different handling on the ground versus in the air, influencing how speed techniques are executed.
- đ ïž Tool-assisted speedruns exploit these mechanics further, using scripting for inputs to achieve record times unattainable by human players.
- đšâđ» The video explains the original Quake source code and how it gives rise to these movement techniques, with references for further reading.
Q & A
How have player movement techniques in Quake evolved over the years?
-Player movement techniques in Quake have evolved from simple tricks to elaborate routines, including zigzagging, wall running, and bunny hopping or strafe jumping, which have significantly changed the gameplay.
What is zigzagging in the context of Quake?
-Zigzagging is an early trick in Quake where a player rapidly alternates the strafe keys while running forward to gain a speed boost.
What is wall running and how is it performed in Quake?
-Wall running is performed by strafing into a wall while running parallel to it, allowing the player to maintain a constant wish-to-velocity angle and gain a speed boost.
What is bunny hopping or strafe jumping, and how has it evolved?
-Bunny hopping or strafe jumping is a technique that involves holding a strafe key and turning the mouse to stay in an acceleration zone, and it has evolved to maximize speed in Quake.
How is the player's intended movement direction represented in Quake?
-The player's intended movement direction is represented by a 'wishder', which is formed by adding a scaled forward vector to a scaled side vector and normalizing the result.
What is the role of the wishter in updating the player's velocity in Quake?
-The wishter is used to update the player's velocity in the horizontal plane, while the vertical velocity is calculated according to a simple gravity model.
How does the velocity update function work when the player is on the ground in Quake?
-When on the ground, the velocity update applies friction to scale the speed, and then updates the velocity by adding the wish scaled by an 'add speed' factor, which depends on the current speed and the maximum intended speed.
What loophole in the velocity calculation allows for speed manipulation in Quake?
-The loophole lies in taking the current speed as the scalar projection of the velocity onto the wishter, rather than the length of the velocity vector, allowing players to manipulate the wishter relative to the velocity to make the current speed as large or small as desired.
How does zigzagging exploit the velocity update rule to increase speed in Quake?
-Zigzagging gains speed by changing the strafe direction against the current movement direction, causing the velocity to move towards the wishter and then switching strafe direction to repeat the process.
What is the significance of the wish-to-velocity angle in strafe jumping?
-In strafe jumping, the wish-to-velocity angle is kept close to 90 degrees by holding a strafe key and turning the mouse to stay in the zone of acceleration, allowing for continuous speed increase.
How does tool-assisted speedrunning in Quake differ from human speedrunning?
-Tool-assisted speedrunning uses scripting of inputs to overcome human reaction and dexterity limitations, allowing for continuous selection of the wishter and alternate direction on every frame for maximum speed increase.
Outlines
đź Evolution of Player Movement in Quake
This paragraph discusses the evolution of player movement techniques in the game Quake, from simple tricks to complex routines that have transformed gameplay. It introduces three key movement techniques: zigzagging, wall running, and bunny hopping or strafe jumping. These techniques provide speed boosts and originate from the same piece of code, which has influenced many other first-person shooter games. The script explains the player physics logic, starting with the conversion of key presses and mouse movements into a 'wish der', which is used to update the player's velocity in the horizontal plane. The vertical velocity is calculated using a gravity model. The paragraph also delves into the mechanics of speed manipulation through the loophole in the velocity calculation, which is central to executing advanced movement techniques.
đ§ Exploiting Velocity Mechanics in Quake
The second paragraph delves deeper into how players exploit the velocity mechanics in Quake to achieve high-speed movement. It explains how techniques like zigzagging, strafe jumping, and wall running are executed, with a focus on the importance of the wish-to-velocity angle. The paragraph provides a detailed analysis of how these techniques are applied in the game, including the use of mouse movements and key presses to manipulate the wish der relative to the velocity for speed gains. It also touches on the use of tool-assisted speedruns, where scripting inputs allow for continuous selection of the wishter and maximize speed increases, resulting in record-breaking completion times. The video script concludes with an invitation for viewers to like, subscribe, and comment with any questions they may have.
Mindmap
Keywords
đĄZigzagging
đĄWall Running
đĄBunny Hopping
đĄWish Vector
đĄVelocity Update
đĄStrafe Jumping
đĄFriction
đĄAcceleration Zone
đĄTool-Assisted Speedruns
đĄCL Forward Speed and CL Side Speed
Highlights
Quake's player movement techniques have evolved significantly over the years, impacting the game's playstyle.
Early tricks like zigzagging were discovered, involving rapid alternation of strafe keys while moving forward.
Wall running technique involves strafing into a wall while running parallel to it.
Bunny hopping or strafe jumping has seen its own evolution in the history of Quake.
All three movement techniques provide a speed boost to the player.
The techniques originate from the same short piece of code, influencing the design of many first-person shooters.
The player physics logic converts key presses and mouse movements into a wish vector for intended movement direction.
The wish vector is formed by adding scaled vectors and normalizing the result, influenced by directional keys and speed variables.
A loophole in the velocity calculation allows manipulation of the current speed, leading to speed boosts.
Zigzagging gains speed by alternating strafe direction against the current movement, demonstrated with slow motion analysis.
Strafe jumping involves a pre-strafe or circle jump to gain initial speed beforeç©șäž transitioning to the inner part of the jump.
Wall running is performed by running along a wall while strafing into it, with velocity clipped to be parallel to the wall.
In-air velocity update is similar to ground, with no friction and a reduced nominal maximum speed.
Strafe jumping requires keeping the wish-to-velocity angle close to 90 degrees for continuous acceleration.
Speed runners tap forward when approaching the ground to momentarily reduce the wish-to-velocity angle and maintain acceleration.
Tool-assisted speedruns exploit joystick-like inputs for continuous selection of the wish vector, maximizing speed increases.
The video explains different ways Quake's player movement and acceleration are exploited for speedrunning.
Transcripts
over the years quake's player movement
techniques have evolved from simple
tricks
through to elaborate routines that have
completely changed the way the game is
played
one of the earliest tricks discovered
was zigzagging a rapid alternation of
the strafe keys while running forward
next came wall running which is done by
strafing into a wall
while running parallel to it finally
there is bunny hopping or strafe jumping
a technique that has gone through its
own evolution over the history of quake
all three give the player a speed boost
and amazingly all three are born from
the same short piece of code
being the progenitor of a vast family of
first-person shooters
quake's player movement dna can be found
in many other games across the genre
for example any other game that features
strafe jumping of some kind
likely has the same short piece of code
or something very similar
at its heart we have explored strafe
jumping
specifically related to quake 3 in
another video linked here
in this video i'm going to dive into the
original quake source and explain how a
relatively small piece of code gives
rise to all three of these techniques
rather than showing the c code directly
i've translated it into pseudopython for
clarity
however i've also included references to
the c code if you wish
to read further the player physics logic
starts by converting key presses and
mouse movements into what's known as a
wish der
as the name suggests this gives the
player's intended movement direction
it's formed by adding a scaled forward
vector to a scaled side vector
and then normalizing the result which
components are included depends on the
directional keys that are being pressed
in addition the length of the forward
and side vectors can be adjusted with a
cl forward speed and cl side speed
variables
we'll come back to these later
the wishter is used to update the
player's velocity in the horizontal
plane
the vertical velocity is calculated
according to a simple gravity model
when on the ground the velocity update
looks like this
first of all some friction is applied
which scales the speed
the rest of the function updates the
velocity by adding on the wish to
scaled by some factor which i've called
add speed
the amount of speed to add depends on
the current speed and the developer
intended maximum speed
so far so good however it's in the
calculation of the current speed that
the loophole lies
rather than taking the current speed as
the length of the vowel vector it is
taken as the scalar projection of the
velocity onto the whisper
by using the keys and mouse to
manipulate the wish der relative to the
velocity
you can make current speed as large or
as small as you like
the add speed is then just the
difference of the current speed and the
nominal maximum speed
clipped to be between zero and a
constant intended to limit the player's
acceleration
whenever the add speed is being limited
by the max acceleration constant you can
make the speed on the next step faster
by bringing the whistler closer to the
velocity's angle
fully exploiting this bug then usually
requires having the current speed lag
behind the max speed by this
acceleration limit
let's see how this theory can be
exploited in the game with some slow
motion analysis of a few speed running
tricks
since the speed increase for a given
frame depends only on the wish angle
relative to the velocity
we can make a plot of hypothetical speed
increases
the blue bar here corresponds with the
selected wister
so the point where it crosses the curve
gives the actual speed increase
the technique shown here is known as
zigzagging which gains speed by changing
the strafe direction against the current
movement direction
the velocity then moves towards the
whistler pushing us into a zone of
deceleration
but then the player switches strafe
direction changing the whistler relative
to the movement direction once more
and so the process repeats with the
player gaining speed
until the speed gained by manipulating
the angle is balanced out by the speed
lost through friction
strafe jumps usually start with a move
on the ground where forward and a strafe
key are held while swinging the mouse
known as a pre-strafe or circle jump
this gains some initial speed before
transitioning to the inner part of the
jump
like zig zagging the whistler is
continually changed to keep the wished
velocity angle in the sweet spot
although this time it's done by changing
the view angle rather than the keys
here's an illustration of wall running
which is performed by running along a
wall while strafing into it
collisions with walls are handled by
clipping the velocity to be parallel to
the wall
this means that the wish to velocity
angle can be kept constant
simply by moving into the wall at a
steady angle as with the other
techniques
doing this at just the right angle gives
a speed boost note that when looking at
the wall
extra friction is applied so wall
running is best performed by strafing
into the wall
rather than running into the wall with
just the forward key
when in the air the velocity is updated
in a very similar way to on the ground
the only differences are that no
friction is applied and that the nominal
maximum speed is only 30 units a second
reducing the nominal maximum speed means
that to accelerate
the player's wish to velocity angle must
be close to 90 degrees
much less and current speed exceeds the
new limit and therefore add speed is set
to zero by the lower bound in the clip
call
much more and wish the points back on
vel enough that the total vector does
not get longer
when strafe jumping the angle is kept
close to 90 degrees by holding a strafe
key while turning the mouse to stay in
the zone of acceleration
to stay on a straight path the strafe
direction and turning direction can be
changed which places the angle near the
sweet spot on the opposing side
typically the player will chain together
a series of these jumps minimizing time
spent on the ground and subject to
friction
nevertheless there is still exactly one
frame between each jump when the ground
physics apply
this means that the acceleration zone
briefly moves to a more moderate angle
to deal with this the best speed runners
will tap forward when approaching the
ground
momentarily reducing the wish to
velocity angle
the exact angle is determined by the
ratio of the cl forward speed and cl
side speed variables
default values work pretty well provided
that the always run option isn't used
which doubles just the forward speed
instead the run key should be held or
plus speed issued at the console
which increases the forward speed and
side components in the same ratio
this covers all the ways that people
have exploited the velocity update rule
in quake
but is there another technique to move
faster it turns out there is
but it's only exploited in tool assisted
speedruns that is
speedruns that permits scripting of
inputs to overcome limitations of human
reactions and dexterity
here's a clip from the current tool
assisted world record which completes
the game in 9 minutes and 35 seconds
over 2 minutes faster than the human
record there's no side to side movement
as you'd normally see with strafe
jumping
yet nevertheless the player is still
gaining phenomenal speed
what's actually happening is joystick
like inputs are being used rather than
keyboard inputs
using inputs like this allows continuous
selection of the wishter
the script driving this run can then
select the wish to velocity angle on
each frame to maximize the speed
increase
being computer controlled the script can
alternate direction on every frame
resulting in a virtually straight path
unlike a regular strafe jump the view
remains stable as the mouse is no longer
required to influence the whistle
i hope this video has helped to explain
the different ways in which quake's play
or acceleration is exploited
if you liked it please click like and
consider subscribing
as always if you have any questions
please leave a comment below
Voir Plus de Vidéos Connexes
You Can Make WoW MUCH More Fun, Right Now: Ultimate War Within Keybinding Guide
The Phases of the Long Jump: An Overview!
FC 24 - PERFECT SHOT TUTORIAL - HOW TO EASILY SCORE MORE GOALS WITH THIS OP TECHNIQUE
Bushido Risen Sun Rules Video 2: Movement
The Fundamentals Of Good Aim | Aim Guide Part 1
Why 99% Of Amateurs Get This Wrong!
5.0 / 5 (0 votes)