Transponder Range In, RCS Thoughts, and Gas Sim Slow-Downs
Hey Folks! Our 2-day vacation was a big success. Not a single computer screen for the duration. Fresh sea air, mountain hikes, good food...really nourishing stuff. I should probably do that more than once or twice a year :)
Back at the office, I was able to add transponder range culling to the plotter pretty quickly. Assuming they have a range of about 20 million km (20Gm), we cull anything further from us than 1 light-minute,or roughly half of Mercury's distance from the Sun. If you're approaching a station, it's enough to see all traffic around it of consequence, but nothing across the System or even between here and the next planet.
In the future, I'll probably expand scanners to account for longer-range stuff at a lower refresh rate, plus radar pings and LIDAR imaging for more complete pictures. And maybe focused tracking of a blip using targeted scans. But in practice, we're mainly trying not to crash into things and/or approach something safely. And this'll do.
And the good news is, we're a solid 70-80fps with this new culling in place. Even when dozens of ships are in local space around a station. Orbital plotting is much faster than the former 15-40fps. Next step will be to make it more usable in crowded places, which probably means better panning, targeting, and information controls.
While I was doing this, I did a bit more research and thinking about using fusion thrusters (torches) vs. reaction control system (RCS) thrusters. So far, I'm assuming light-up of a torch is grounds for swift justice near any populated area. It's effectively a giant nuclear blowtorch that would melt/irradiate anything in its path.
The back-of-the-napkin math Michael and I came up with was a range of 4000km out from station. You better have your trajectory under control and fusion off at this range, or you're a criminal. Nothing but RCS from there and closer.
However, my assumption was also that RCS was mostly about orientation and minor lateral control. Nothing powerful enough to move thousands of km conveniently. Does this mean we need an intermediate thruster to get around local space? Chem rockets? Ion thrusters?
However, reading a bit about the RCS in the Expanse reveals that it is actually suitable for lift-off, and in some cases, folks are saying it canonically reaches multi-G acceleration. If that's the case, maybe we can scrape by with just the torch and RCS, assuming we have enough reaction mass in the RCS to do so. For now, this might be my assumption until we have more info.
Finally, I was testing the new and improved plotter framerate and docked with a big derelict to see how it fared. And noticed a huge drop in framerate. More than expected. I found part of the problem in my lighting code, which was updating per-frame even when the lights weren't moving.
Fixing that helped a bit, but there's also a bottleneck in the gas exchange code. Every hole in the ship runs that code, and it piles-up cpu and garbage collector costs. I think there's some stuff in there I can do to help, like pooling dictionaries, caching requests for objects on the ship, or aborting gas exchanges between voided rooms and space.
But for now, it's the weekend. And if I'm a good boy, I'll use it accordingly to compound the rest from vacation. If I'm a bad boy I'll still work on the game during the weekend and not blog about it :)
In any case, see you all Monday!