by cloudmike · 2y ago · 0 comments
I always assumed this was a bug-turned-feature, like skiing in Tribes. When I saw the repo just now, I looked for clues, but didn't spot any related comments around the line of code where this ultimately happens:
https://github.com/kevinbentley/Descent3/blob/142052a67d4318...
In Descent 2 and 3 you also had the "afterburner" which gave a speed boost forward, but it had limited (albeit quickly recharging) energy, and the speed boost it gave you was greatest at 100% energy and effectiveness dropped as remaining energy dropped towards 0%. So people learned to pulsate it multiple times per second so that it would recharge between the fraction-of-a-second uses and keep at ~95% all the time instead of quickly dropping to low figures.
So if you wanted to go really fast you'd both run diagonally in three dimensions and keep pulsating the afterburner multiple times per second.
A naive implementation of just adding the x and y vectors together will become their sum, totaling up to the diagonal length, 1.41x faster. In 3d even more.
This is a very common bug (feature) in many old games.
Quake famously did consider this bug while walking but not while jumping, leading to a more complicated trick to speed up called strafe-jumping.
It made people really difficult to hit when you were behind them.
I played against some ladder players and was amazed at their other order of magnitude skill.
Part of the reason those og games were so compelling to me is because they didn't really have a skill cap.
It would have been amazing to watch some of those matches in a streaming platform.
var playerX_input = Input.GetHorizontal(); // float in range -1 to 1
var playerY_input = Input.GetVertical(); // float in range -1 to 1
var playerVelocity = new Vector2(playerX_input, playerY_input);
// The player can now move 1 unit/frame in X and 1 unit/frame in Y, which means that if they're moving diagonally, the length of their velocity vector is the length of the vector (1,1) which is sqrt(2) (~1.41)
// This can be corrected by doing something like
if(playerVelocity.length > 1)
{
playerVelocity = playerVelocity.normalized();
}