Separating Nav Station from Star System
Hey Folks! It's a code day today, and most of my day looked something like the screenshot above (taken from the Navigation Console UI).
The main thrust of today's effort was getting the star system simulation to be a separate thing from the navigation console's simulation. There's a lot of overlap between what the navigation station and star system need to do. Things like keeping track of ship positions, planets, moons, gravity, and updating all of this over time.
The difference is that the star system needs to keep track of where things [i]are/[i], while the nav station needs to show either where things are or will be.
So most of the work was moving all of the position updating and physical calculations to the star system, and leaving the UI drawing in the nav station. Then, make the nav station point to the star system to get its info (and maybe make copies if it needs to fast-forward into the future).
It was a lot of tedious work, and also a lot of challenging work, as I tried to keep all of this stuff in my head. And almost certainly I've broken something in that orbital plotter that took months to refine. I've got backups of the old code if I need it, of course. But I think they should be solvable with some test runs.
It's actually displaying almost normally when the AI raises it already, except the ship and planet positions haven't been loaded into it yet. I have some code to load it in already, and tomorrow, I just need to find the appropriate time and place to do so when the AI raises the UI. (Ideally, immediately after the UI appears and before its first render pass.)
Not much to see, unfortunately, but a pretty big step nonetheless!