Timer Fixes, and Course Plotting Features

Hey Folks! Spent a pretty good chunk of today revamping the timer code to fix a bug, and then started on some course plotting enhancements. Plus a quick triage.

The timer code bug was pretty much as expected. I was tracking time on generic tickers by subtracting time left per-frame, based on the previous frame's time. However, this seemed to produce sync issues occasionally, which compounded as things progressed. And in the case of breathing, the oxygen deficit would increase at a different rate than breathing would decrease it.

The interaction and condition tickers, however, worked fine. And this was because they didn't subtract time left per-frame. Instead, they recalculated time left based on the Star System's current epoch (time), and the time when they started ticking. This produced an absolute value that was always accurate.

So I changed the generic tickers to do the same thing, and eventually, it worked! Not without a few hours of tracking down timer code, though. It took a while to make sure I ironed out the wrinkles.

Once that was done, I did a quick triage of current tasks, and even found a handful I could close! I also found a couple related to the recent RCS maneuver stuff I did, so I added those to my "to do" list.

And that's where I'm headed next. We have rudimentary RCS controls, high accuracy, and smooth performance in the orbit plotter now. But the user experience (UX) still needs work. Plotting a course and/or flying still feels fairly clunky, and one really has to know the idiosyncrasies of the tool.

One of the first things I'm going to do is make the cursor position follow the mouse, instead of the screen's center. This way, the screen can still pan with WASD, but the targeting of objects can be done with the mouse. It breaks with the visuals a bit in that it behaves more like a touchscreen, but usability might trump realism here.

Anyway, we'll get it so that the user can click a target (like a derelict or station), and the plotter selects it. This might mean I can do away with the "FREE" toggle button, since it'll probably be redundant with direct clicking. (And probably confused more people than helped.)

I'll also likely add a UI toggle or similar to control whether the plotter follows the current ship, current target, or nothing (sits still). Useful for when the ship and target have different relative velocities, and we want to keep one of them on-screen.

There's probably more that will come up with testing, too. Being able to select and query targets for info. And that might also mean having one target for the current destination, and another for querying.

Ultimately, it should feel more like a useful tool than an imposing and obtuse set of buttons.

Tags: Ostranauts