Orbital Plotter Love
Hey Folks! While Tiago works on the Android save patch, I decided to try and get some more prototyping done on the plotter. And it's getting pretty close to usable.
One of the most obvious changes today was switching the line renderer to use colored solid lines instead of textured lines. I like the visuals slightly less, but it allows me to prototype a lot faster if I can just plug color values in rather than making new textures for each new color.
And with that change, it became easier to do things like custom colors for different celestial body types (sun, planet, asteroid, centaur, etc.). I also could make projections dimmer versions of the original. And as you can see around the sun in the image above, I now have gravity wells in a dark red. They roughly correspond to 25% Earth g, which is also about 25% of typical ship thrust. It's sort of an arbitrary number, but represents a zone where the pull will significantly alter trajectory compared to a 1g thrust.
And that brings us to the next point. Gravity works now! Not only on the realtime ship position, but also on projected future positions. The image above shows projected ship positions bending around the sun's grav well as the ship attempts to reach the course destination crosshairs. It's still far from perfect, as the step size affects how granular the calculations get. And depending on how close one of the steps is to a grav well, it can over/underestimate that well's effects.
I briefly attempted to account for this, but didn't make much progress. I'll skip that for now, since it's maybe good enough for now, and not the most valuable way to spend my time.
I also rearranged and added some new UI bits as I went. One of the big changes is a new "FOLLOW" button, which basically locks the camera to the ship as it moves around. Useful for finding a ship when off-screen, or keeping a watchful eye on surroundings.
At this point, there are still some improvements I can think of, but it might be a good time to switch back to the crew simulator and take this for a test drive with an actual ship and crew. In theory, I should be able to swap-in a real ship for the test one I've been using, and raise this UI when a crew member interacts with a console. And when the player hits the "ENGAGE" button, the actual ship will start navigating.
Then, I can start testing things like whether the timeline is workable or needs fast-forward. I can also probably pick some arbitrary "good enough" distance and speed at which the game thinks the player reached a destination. E.g. if they approach within 500,000km with a relative velocity < 5km/s, consider them docked. Or maybe switch to a docking minigame. (I hate that word, but that'd basically be accurate. E.g. align the docking rings and adjust reaction control thrusters to connect)
If I can get something like that working, we actually have the beginning of a game loop!
- Choose destination
- Calculate course, duration, etc.
- Buy supplies for trip
- Engage course
- Drama happens for days
- Reach destination
- Docking "minigame"
- Do stuff at destination
And if bad/interesting stuff happens during #6 (or any stage), course gets aborted or diverted, or the ship continues drifting, etc.
Of course, I still have to add a bunch of what I said up there. But some major portions are already done. Namely 1, 2, 5, 6, and 7. But keep in mind that this plotter UI was #s 1-2, and took months to do. Similarly, #6 is a whole ball of yarn that took months, as well. And it's pretty darned spartan :)
In other words, we're a ways off yet from playing anything. But the skeleton of a game is almost there!