Creation, discussion, and balancing of game content such as techs, buildings, ship parts.
I too am a little confused why we are losing this starlane when MIN_PERP_DIST=10. My best guess is it's a system outside of the screenshot. There is a test that allows close objects sufficiently far but the condition is:Oberlus wrote: ↑Tue Nov 05, 2019 9:57 amEdit: Notice the absent starlane between Ster beta and the pale blue empty system in the SW corner.
It is just outside of the maximum distance (250). Does anyone thing it should be connected?
Edit 2: no, it's not outside the maximum distance, it was connected when using MIN_PERP_DIST = 10 and MAX_LANE_DOT_PRODUCT = 0.87. I don't understand why increasing MIN_PERP_DIST forbids that starlane.
Since the distance between Ster B and the empty sw system is quite large, there may be something even further southwest that is prohibiting the starlane from being gernerated btwn Ster B and the empty Southwest.
Code: Select all
// if object is further from either of the lane end systems than they // are from eachother, it is fine, regardless of the right-angle // distance to the line between the systems if (dist2_12 < dist2_o1 || dist2_12 < dist2_o2) return false;
Your solution of simply upping the MIN_PERP_DIST seems to have done the trick.
If it is producing undesirable results in this case or another case, another possibility is tightening the condition quoted above:
Could have instead, e.g.
where alpha is bigger than 1. This would make the corridor around the starlane whose perpendicular proximity we are testing shorter. If alpha is too big, we would start admitting systems near the midpoint whose perpendicular distance was smaller than MIN_PERP_DIST.
Code: Select all
if (dist2_12 < alpha * dist2_o1 || dist2_12 < alpha * dist2_o2)
Presumably, there is some minimum distance between any two systems (at least during universe generation?). If we have this constant it should be possible to come up with a good value for alpha.