The player’s forward thrust implementation was very simple initially, taking direction from the tutorial that started this whole project: add speed in the direction that the player is facing and then clamp absolute speed to the player’s speed limit. In the tutorial, this was always satisfactory because they player had no way to exceed their speed limit, but in RPD, you could build up reverse thrust with recoil or get hit by an enemy shot (and later on, a non-fatal enemy collision) that would send you flying well past that speed limit. With the naive thruster implementation, as soon as you tried to “accelerate”, you’d pop back down to the speed limit instantly; Brian and I found this unappealing because it felt weird while playing and it flying out of control too easy a problem to fix.
My implementation of the solution is here; it dips into the vector pattern I learned from Sam Spade as a replacement for using GameMaker’s built-in movement functions, though I haven’t fully converted entities to use that alternative yet.
Brian noticed that thrust clamps the player back to the speed limit, even if a lot of speed has developed due to recoil of shield-deflection; we hashed out a solution, and over last night and just now, I managed to implement it. There’s something weird that causes a bit of lateral motion when thrusting against a lot of speed, but it’s manageable.