Ground control to Major Tom. Come in, Major Tom.
I finally buckled down and reworked the camera and ship control code in the space game, and I think I have something promising at long last. There were really two major broken things, the ship control itself and the chase camera. I pulled them apart into their own classes and addressed their problems separately, which shockingly turned out to be a cleaner way to deal with them.
At a fundamental level, ship motion is Ace Combat-style. You maintain a constant velocity forward but can hold the left or right analog trigger to temporarily decelerate (all the way to a stop, in my game’s case) or accelerate using afterburners. I’ve always found that monitoring my ship’s speed is a giant hassle I can never keep up with in space sims, and the AC model means it’s simply not a problem. You know your speed at all times because you are personally holding the analog triggers that set it, just like you know whether your car is stopped or accelerating based on the pedals you’re pushing down with your feet. As far as velocity and inertia goes, right now you simply lerp to your new velocity at a constant rate. This is utterly nonsensical from a physics point of view but it sure was simple to program and it’s not hard to understand what’s going on, an important factor when you’re in interplanetary space without a lot of landmarks around.
The other nice thing about this is that all the ship behavior is based on a set of constants. Reducing the steering lerp rate, say, makes the difference between a nimble fighter and a heavy barge. This’ll make it easy to support different “flight models” for different ships, or even the same ship equipping different types of equipment.
As for the chase camera, it’s a simple affair that monitors its target and lerps (sensing a pattern here?) to the desired chase position and angle. This works nicely in that by adjusting the lerp rate I can tweak to what extent you see the ship pivoting and reeling about on the screen, and the more violently you maneuver the more the camera lags to give you a sense that you’re making tough maneuvers. I might make the lerp rate dependent on your speed, so the ship feels a little out of control at top speed. It would be easy to explore, at any rate.
Lack of decent, non-hacked in camera and ship control was a huge blocker for the game, so maybe I’ll feel better about exploring different areas of gameplay now.