Hey guys, HalfwayDead here back with a proper episode of Rocket Science.
In this one we're going back to the first episode, quantifying the info and I'm going
to show, how we can use all of this data to find real advantages for gameplay.
So far we have only taken a look at turning on the ground.
Turning in the air, however, is completely different in many regards.
First of all, we have three axes to consider now instead of one.
There is Yaw, which is the equivalent axis to turning on the ground, Pitch, which is
when you tilt over forwards or backwards and Roll, which spins you around the long axis
so you can orient your wheels.
The other major difference on the ground is that the car will always tavel pretty much
exactly the direction it is facing unless you're using powerslide, but while in the
air the direction is irrelevant unless you accelerate the car with boost for example.
So the angular velocity measures we took in the turning episode cannot be compared in
any way with this.
For the sake of covering it: Ground turning is always better than trying to turn in the
air with boost unless you're basically standing still and even in that case jumping is likely
not the correct solution for different reasons.
So with that out of the way let's finally get to some numbers.
The car has an angular velocity hard limit of 5.5 rad/s or in more undrestandable terms
this means the car can do 7/8 of a full rotation in one second.
This limit is for all axes combined and it is quite easy to reach in the air.
When you try to turn the car around the yaw axis you get an angular acceleration of 9.11
rad/s^2, so you'll be turning at the maximum angular velocity after just about 0.6 seconds.
Around the pitch axis it's 12.46 rad/s^2, allowing you to reach the fastest turn after
just 0.45 seconds.
Now the roll axis comes in with an initial angular acceleration of 38.34 rad/s^2 but
it does have a damping term which means the acceleration gets less if you're already air
rolling fast.
You do still reach the maximum turning speed after just 0.25 seconds of airrolling.
I'm not gonna go into detail about how the damping math and inputs with below maximum
magnitude work because I don't think it is of value to any human player, but this time
I do have the luxury of being able to refer you to an absolutely amazing blog post by
Sam Mish which covers everything you could ever want to know about the rotation maths.
There are some more important things I need to cover though.
First of all, what happens when you stop giving any inputs?
In that case the damping takes over and it will slowly bring you to a stop.
However, it is much faster to stop by doing the exact opposite inputs that you used make
the turn in the first place.
Then you will be able stop the turn as fast as you started it, or even faster in the case
of air roll.
You might also wonder why the acceleration around the different axes isn't the same.
Before I tell you why, I want you to know that all these acceleration values are 100%
identical for all cars.
Psyonix merely set somewhat sensible values that roughly work for all cars.
You see in real life, it is easier to rotate any object around it's longer axes.
The longest axis of the cars is by far front to back one, which happens to be the axis
around which the roll rotation happens.
Because the cars also have more width than height, pitch rotations are a little easier
than yaw rotations.
Something important for the future that I want to mention right here, is that knowing
the different accelerations axes can be used to your advantage and you can input all three
axes at the same time with the air roll left and right bindings, which will give you an
even higher angular acceleration than only using 1 or 2 axes.
And without those bindings there are still uses for air roll to navigate through the
air more efficiently.
It's something to think about for now but totally worth it's own video.
What else do we need to cover in the air?
If you remember episode 1 then some of these things will sound familiar to you, but now
we're going to quantify them too.
Plenty of people still don't know that using your throttle key/trigger will actually accelerate
you very slightly in the air similar to boost.
The acceleration works just like boost forwards and in the exact opposite direction backwards.
The acceleration is 66 uu/s^2.
That is only 6% of the boost strength but it does come for free and if you face the
car exactly upwards or downwards you can effectively reduce gravity by 10%.
When you're boosting this extra forward force is always activated so it doesn't matter what
you're inputting then.
I already included it in the boost acceleration number.
Therefore I can't tell you that it just makes you 6% faster because it doesn't.
It can make a difference in really long aerials or generally any situation where you're low
on boost.
Think of an example where you just needed 1 or 2 more boost to hit the ball.
Since you can also use it to slow yourself down, you can think of it as having the option
to have up to 66 uu/s^2 more or less giving you a range of 132 uu/s^2 in total.
Default keyboard controls don't allow you to take advantage of this but it is clearly
not stopping anyone from reaching RLCS LANs.
Another mechanic of which we need quantified data is the jump.
There are several numbers here.
First, we have a jump off an object usually the ground.
This impulse instantly gives you a velocity of 292 uu/s in the direction perpendicular
to the surface that you jumped off.
Then, during the next 0.2 seconds, if you keep the jump button held down, there is an
additional force acting in the upwards direction relative to the cars orientation that accelerates
you by 1458 uu/s^2.
The maximum extra velocity it provides works out to just about 292 uu/s too.
Even if you release the jump button instantly it will be active for at least 3 ticks so
it provides 36 uu/s of speed at minimum.
Additionally, there are so called sticky forces that are supposed to keep your car on the
ground.
These will decelerate the jump by 325 uu/s^2 while the wheels are touching the ground.
And it turns out that the wheels don't leave the ground in the first 6 ticks of the jump.
If you do the math, then you'll find, that holding jump down will give you double the
upwards velocity compared to a quick tap.
We also have to take a look at jumping in the air or in other words: The second jump.
The impulse of it is also upwards relative to the cars orientation and just like the
initial jump, it gives you a boost of 292 uu/s.
If you're interested in how much time you have to use the second jump after the first,
check out my video about dodges which covers this and a lot more.
Now what would you want with all these numbers.
How does knowing any of this benefit us?
All this information can be used to optimize input sequences and find solutions to questions
like "What is the fastest way to aerial?".
Bear with me here, even if you don't understand everything because I'm trying to build an
example.
So we want to model this in a mathematical way, so we need to think about the location
of the car which we want to get up as high as possible.
The upwards axis in the game is the z-axis.
z(t) is therefore the vertical location of the car at time t.
First of all, we need a starting location which is the usual position in which the car
sits on the ground.
We call this z_0 and it's just a number that depends on the car preset we're using.
For the Octane it would be 17.01 uu.
When the car has a velocity in the z-direction like a jump, then it will move over time.
The total distance is given by the integral of v(t).
So we have yet another function of t we need to define.
The velocity at time t is once again made up by a v_0 which in our case is the velocity
of the initial jump.
Then we have the acceleration provided by the first jump as well as the acceleration
from boost.
Both of these are relative to the orientation of the car and that's where the angular velocities
and accelerations from the beginning of the video show up.
This isn't even the whole picture, but it should be more than enough to illustrate the
point.
The problem at the end, is that we still have the inputs left which could be different at
any time.
This is a pretty complex problem of optimal control theory.
Unfortunately, I'm no expert on that and it's quite complicated, but if someone happens
to know more about it I'd love to learn.
So what do we do if the problem is too complex?
We make assumptions to simplify the problem.
For the first assumption, we're going to say that the perfect adjustment towards the ceiling
at the end doesn't matter.
This is also the part of the aerial that is probably going to differ in any real gameplay
scenario because we usually want to hit the ball, not the ceiling.
We can also make an assumption about when to use the 2nd jump.
You'd always want to use it as early as possible because if you tilt further, you gain less
upwards momentum.
Of course, you do have to consider the force when you hold down your jump button, but at
least we limited the options.
Last but not least, we're going to limit the inputs to just a starting time and provide
a consistent ending towards the ceiling.
Now the optimization problem becomes a lot easier.
We can also turn all the integrals into sums because Rocket League runs on discrete physics
ticks.
Now the calculations become quite possible and we can check with a simple piece of code
whether it's worth it to delay tilting the car so we can get more out of the jumps.
The answer is quite a clear no.
You should always try to tilt the car backwards as fast as you can in a fast aerial.
The timing of the 2nd jump is also nothing special.
You'll always want to hold down your jump button for 0.2 seconds on the first jump,
then release it and press it again as fast as you can.
In theory, that requires releasing the jump button for 1 physics tick which is 8 ms.
In reality, it's quite hard to release the button for less than 30 ms consistently.
Even when taking that into account, it's still not worth it to stop the first jump press
in order to do the second jump earlier.
If you want to try and learn the correct rythm you can try doing so with a metronome set
to 250 BPM.
Then do the first jump on one tick and the 2nd jump on the next tick but hold down the
button as long as you can in between.
You can increase the speed a bit if you're confident that you can do the release press
motion in less than 30 ms but it's not worth it if you release the first press too early.
Eventually, I'd like to offer training tools for things like these, that will tell you
if you did it correctly or what part needs improvement.
It's time for an evaluation.
Is there any benefit to what we're doing here?
In episode 1 I had no tools to do my research with.
I couldn't quantify most of the findings and only had very limited knowledge I could use
to my advantage.
I tried to create a macro for the "perfect fast aerial" and got a macro that was able
to reach the ceiling in 2.28 seconds.
What do we get now?
2.125 seconds.
That is an advantage of 150 ms which can absolutely mean you beat someone to the ball and hit
it above them.
But what about the human advantage?
These are macros after all.
For that, I recorded myself doing an average of five fast aerials to the ceiling.
The result was a very consistent 2.3 seconds.
Then I tried applying the knowledge of this episode and trained for just 15 mins.
The main thing I'm seeming to do wrong is that I wait way longer for the second jump
than I should.
When I retook the test, trying my best to use the right timing, I was less consistent,
doing a couple of backflips and having one big outlier.
Still, my average decreased by over 20 ms and if we remove the outlier the decrease
was 50 ms.
That's not too bad and while I won't be able to focus that much in game, I have no doubts
that I can get myself to do 50 ms faster aerials sooner or later.
I wouldn't be surprised if professionals are already that fast on their aerials or even
a bit faster but regardless of that this data can help you strive for the perfect aerial.
With that out of the way, I have a couple more things to say.
First of all, as you may remember, all the cars are tilted forward in a very slight manner.
That should alert you to the fact that in a theoretical perfect fast aerial, you shouldn't
boost until you have tilted the car at least the tiniest amount back.
Depending on the car preset, this is 11 to 13 physics ticks after the first jump.
However, if we do the math, the reality is that this difference is so tiny, it won't
even help you arrive 1 physics tick earlier at the ceiling.
Since the angle is mostly flat, the boost will propel you forwards and increase your
forward velocity by around 100 uu/s.
So there is a significant difference right there.
If you don't want the forward momentum, you're wasting boost and you'll also need to stop
your forward momentum by using even more boost in the air.
Speaking about boost, we can also compute the perfect time to use your boost if you
have only a tiny amount left.
The result is 0.52 seconds.
That is the most efficient time to use it.
If you have more than a bit of boost, you can space it roughly around that time.
And what happens if we have no boost?
Then we still have the throttle force, but it is a lot weaker than what is provided by
the jumps so it is no longer worth it to tilt the car back as fast as you can from the start.
You don't want to tilt the car more than 7° until the 2nd jump.
Compared to a perfect fast aerial, that means about 60-70% of the input until the 2nd jump.
Alright, I hope that this episode has shown what collecting all that scientific data is
worth and what kind of useful applicable content I have planned that can be of direct help
in-game.
Expect more regular videos again from now on as I am taking on less university courses
this semester.
Shoutout to my patrons, who give me the financial stability to make that possible.
If you want to pledge on Patreon for as little as $1 you get the opportunity to vote on the
prioritization of certain topics and there happens to be a new poll right now.
To stay up to date, follow me on twitter or join my discord and I'll see you soon for
the next video.
Không có nhận xét nào:
Đăng nhận xét