You are here

Main Menu Music, and Course Plotting

Hey Folks! I had almost a full day of prototyping today! And Josh's latest menu music is in.

The prototyping mainly centered around plotting a course to a destination, using some of the tools I've been building in the plotter so far.

The first task was to get a set of crosshairs on the map that the user could control. And for now, these align to the center of the map and follow the screen around as the user pans. When the user wants to lock-in the current position, they toggle the "LOCK" button, and future panning doesn't affect the crosshairs. I'm also planning to add a "SNAP" toggle which will snap the crosshairs to the nearest celestial object instead of dead-center on the screen.

With this in place, I was able to start work on a course projection algorithm. Knowing the ship's current position, and the desired destination crosshairs, I could calculate the time it takes to reach the destination at 1g acceleration. Then, I could assume 1g acceleration half way to the destination, and 1g deceleration the other half. (For now, we assume a stationary target.)

And with those acceleration parameters, I can start plotting future positions of the ship. The buttons I added yesterday let me control how many projections to plot, so 1 projection step plots a ghost ship halfway to the destination, 2 steps plots 1/3 and 2/3 of the way there, 3 does it in quarters, etc. If the user wants, they can ramp this up to 10-20 to see fine-grained position info.

The plan is to use this stepped projection calculated from the ship course to also plot celestial objects at those time steps. And with that, we can see if the ship is crossing any dangerous objects during the trip. It has a few minor issues at the moment, including some cases where the number of steps is not evenly distributed. I think this'll be an easy fix once I figure out where the problem is. Likely the difference between <= and <, or a sign error.

I'd also like to add a few things to this, now that I've tinkered with it. First of all, I'd like to account for non-zero initial and final velocities, so moving ships can dock safely with moving objects. Also, grav wells will inevitably interfere with the straight-shot path, so I'd like to apply their effects to curve the path. And likely, I'll let the computer figure out a counter thrust to compensate (rather like "trim" in aviation).

Finally, I realized I'd probably want modes in this screen so the user can query certain objects without canceling the flight plan. So some mode buttons to switch between NAV and INF modes (and maybe others) seem to be in order.

It's starting to feel like a flight computer!

In music news, Josh submitted his latest track for the main menu, and it's beautiful. Rather unlike NEO Scavenger's harsh, exotic electro warble, this one is warmer, synthetic, and a bit ambient. Perfect for pairing with a warm ship's console and background animated activity :)