I was able to make a pair of tweaks to the UX today. One fairly small and another that had annoyed me for a long time.
The first one was one that my son Micah pointed out. The ships were being drawn on top of the HUD display, which seemed wrong. This was actually harder to fix than I expected. I had multiple canvases but for some reason the canvas with the ships would overwrite the canvas with the HUD. I couldn’t figure out why it was doing it be was able to current by moving HUD elements directly into the same canvas and drawing them after the ships are drawn.
Part of the reason I had separate canvases in the first place was an attempt to increase the canvas performance so I may have to revisit that eventually.
The second tweak was something that had been bugging me for a long time. The stars were fixed in position on the screen. And since the player’s ship is always centered they did not move relative to the players ship. I hated that because you don’t get a good sense of the ships motion. In real life, that is actually more realistic but in a video game it does not look as cool.
So I finally fixed this by just creating an array of randomly placed stars and just rendering them like all the other game objects each frame. This is NOT an elegant solution because it will not scale to larger maps at all. But and it work for now and did not seem to make a noticeable impact to performance.
In the long term I really need to implement a strategy for dynamically scrolling the stars in the background as the ship moves through space.