The Starlane Nexus

Creation, discussion, and balancing of game content such as techs, buildings, ship parts.

Moderators: Oberlus, Committer, Oberlus, Committer

Message
Author
User avatar
Oberlus
Cosmic Dragon
Posts: 1660
Joined: Mon Apr 10, 2017 4:25 pm

Re: The Starlane Nexus

#16 Post by Oberlus » Tue Nov 05, 2019 12:01 pm

I think I've made my first PR, #2631, not sure if I did it right.

User avatar
alleryn
Space Dragon
Posts: 259
Joined: Sun Nov 19, 2017 6:32 pm

Re: The Starlane Nexus

#17 Post by alleryn » Tue Nov 05, 2019 2:17 pm

Oberlus wrote:
Tue Nov 05, 2019 9:57 am
Edit: 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.
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:

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;
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.

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.

Code: Select all

if (dist2_12 < alpha * dist2_o1 || dist2_12 < alpha * dist2_o2)
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.

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.

Post Reply