RCS Mode Improvements, Concept Art Progress

Hey Folks! Aspredicted, family sickness has spread to me, and I'm running a bit ragged today. Still managed to get some work done, though, despite the head fog.

Most of today was getting the finer points of RCS mode rendering working, as it's a bit like course-plotting, but just different enough to warrant different branches of code. First order of business was to get framerate back up, as RCS mode was causing a slowdown. A big chunk of that was a missing if/else block that switched between RCS mode and course plotting mode, so it was actually doing both when RCS was active.

I also changed it so it wouldn't redraw orbit tracks unless the screen panned or zoomed, since they rarely change appreciably from frame-to-frame. Similarly, I hid any bodies or orbits that were off-screen due to being too big. (E.g. if we zoom way in on the Sun, we can't see outer planets anymore, even though their orbit center is on-screen).

There were some more technical optimizations I made to some code which converted coordinate systems. These were called many times per frame, so the slightest bloat added up fast. Mostly, this was using object pooling for some double[] vars, and avoiding Unity's Quaternion.Euler when I could use simple Sin/Cos calcs.

Finally, I disabled rendering of future projections when those future times were the present (e.g. delta = 0). And disabled gravity calculations for future projections of NPC ships. (While this means less realistic projections, it was probably unrealistic to expect the on-board computer to be modeling physics for every contact on the radar.)

Then, it was off to do some rendering fixes. I needed the DrawBody function to accept a param for projection index, since it was just moving the real-time ship image around. And those projections had to be provided their own delta positions, instead of just reusing the real-time position over and over.

Finally, I needed to ensure that those RCS projections included parent celestial object in their calcs, so stations and moons would render correctly.

The result is what you see in today's image. We have Jade Rabbit station on Luna (EJDR) tracking forward in time, at 1-minute increments. And we can see our own ship, FA-4616, tracking towards EJDR's current position. The projections tell us that when we are at our final projected position just down and to the left of the screen's center, EJDR will have blown past us up to the top left of the screen. So what we should be doing is RCS thrusting to the upper left, to rendez-vous. Also, our speed is too slow to catch up here, so we may have our first big problem in RCS nav. (Though, I think the UI says we are 4657km from EJDR, so probably far enough to use fusion torch to match speed, then RCS again.)

Anyway, that's coming along. And in other news, Ashley sent me her latest concept sketches, this time for Newcal. She has two on the go right now, and I can't wait to see them. We might have them just in time for the next newsletter!

That's it for this week. Hopefully, I'll rest up over the weekend, and get ready for a productive week ahead. Have a good one, all!

Tags: Ostranauts