Kind of a slow month due to my actual job & spending most of my free time performatively reading Gravity's Rainbow. Still, decent progress!
System Scale
I have once again, and hopefully for the last time, reimplemented the system-scale architecture. More detail than you probably want incoming:
Basically, it's not possible to accurately simulate small-scale actions (e.g. cockpit button presses, or even the ship moving in space from frame to frame) in a world that spans billions of kilometers because the numbers get too big and you run out of decimal places. The solution is a floating-origin, which just means constantly moving the player back to 0,0,0 where all the decimal places live, while moving the rest of the universe in the opposite direction. So in Black Road Sky, and probably any other similarly scaled game, you don't really move the ship in the direction you want to go, you're actually moving the universe in the opposite direction while you stay put. Maybe that's how conscious reality works, too? Trippy, man. There's some additional voodoo required to make everything work (camera tricks that I haven't got around to worrying about yet, implementing double precision math in the places where Unity doesn't support it, etc.), but that's the gist.
This was fairly simple to implement, mostly because I already figured it all out in the previous version, so it was just a matter of getting it working with the current improved game architecture. The end result is that the BRS universe now includes 2 cubes spaced a few billion kilometers apart, and you can travel between them without reality exploding.
Building Out Nav/Com
Now that we have distant objects to visit, I wanted to spend some more time on the new navigation & communication system. Previously, sensors worked magically and were completely divorced from the coms system, which was literally just a big red button that asked the nearest station "cool if I dock?" or "cool if I undock?" depending on context. So lots of room for improvement, and I'm excited about how it's shaping up.
My first task here was to implement a "Transmitter" class, which I can add to any object in the game. The transmitter defines signal type and power (more on that next time!) and constantly blasts out basic info like ID, position, and velocity, on a particular frequency, propagating at the speed of light. Nothing is actually being blasted around at the speed of light (simulating a universe of elementary particles is a bit out of scope), but a clockwork of timers and message queues provide sufficient illusion. Data is passed from communication to navigation for calculating useful values like relative velocities and, eventually, for drawing a new & improved sensor display. Not quite there yet, though.
Communication frequencies in BRS are hidden under a layer of abstraction and are presented in a sort of IP address-like format. I took a silly detour to formally define that format (part of the Solis Unified Transceiver Standard), so even though no one will ever notice, these frequency identifiers represent not only a unique ID, but also indicate the signal source type (ship, station, nav beacon, etc.), province of origin and other context-specific information. Maybe got a little carried away, but if I wasn't the type of dude who gets a little carried away I wouldn't be making this game at all, you know?
Coming Up Next
I've still got a lot of nav/com work that I'd like to get done, but if I feel myself getting too far into the weeds then I may put some of it off until later. After that I'll be working on close-range physics, which was a major weak point of the previous version and is in serious need of an overhaul.
I expect development to continue a bit sluggishly for the next month or two due to the labor that I must sacrifice to Capitalism in return for the right to live (can we get this class war started already? Counterforce unite!) and, less depressingly, end-of-summer honey harvesting. Work tends to derail me around this time of year, so wish me luck as I hold on tight and try to keep the torch above water.