I replaced the whole lighting algorithm with a new one which is capable of to calculate ambient occlusion for a lot longer distance in a lot more detail. While implementing the new system, I also found I lot of bugs that had caused lighting errors in previous versions. Ugly artifacts are now a thing of the past, as every segment makes sure, it's neighbors are available before calculating the light. To give the player even faster loading when discovering a new generated object, the object will first display without special lighting, which is then applied over time.
Well, judge for yourself:
(left: old, right: new)
The missing segment bug
This pesky bug happened once in a while and was therefore very hard pinpoint. The missing segments fortunately never were actually missing (it was just not drawn), but of course it was annoying and confusing if parts of structures were missing. It's now fixed and I didn't encounter it ever since. Also any bugs with missing single blocks have now been fixed.
The flickering camera bug
This bug haunted me for several months. The camera would start to flicker (or quickly jumping to another place and then jumping back), when the game was started or new objects were loaded. It happened absolutely at random and even detecting that the bug just happened was not easy, since a sudden camera movement by the player would have a similar signature. I finally managed to get rid of this bug, as it tuned out that racing conditions of multithreading when two threads simultaneously asked for the camera's position caused one result to be faulty.
Also, the missile crash bug has been fixed.
What comes next
Well, as I took a detour to the further make the basics more robust, my goal for the next updates haven't changed much. I'll focus on different types of asteroids and space stations, as well as enemy AI that will be randomly guarding sectors (or spawn in sectors). Also, I'll try to implement shop economies: shops will vary their prices based of their stock and their demand.
Thanks for playing StarMade,