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
MatGB
Creative Contributor
Posts: 3310
Joined: Fri Jun 28, 2013 11:45 pm

The Starlane Nexus

#1 Post by MatGB » Sun Aug 23, 2015 5:58 pm

First use, um, it might be adding slightly too many lanes:
nexus-build-1.png
nexus-build-1.png (326.91 KiB) Viewed 1825 times
The effects description says it should cross an existing lane or go too close to an existing one, I'd say at the very least the lane that skims past Silk (with the pale blue fleet) and deeper into enemy space, as well as the lane 3 steps anticlockwise that also crosses through the system circle are too much.

I am kinda glad I build a Transformer there so I can use the new Spatial Distortion mechanics ;-)

(why yes, I did deliberately play Clusters to try the new bore and nexus mechanics, isn't it obvious ;-) )

Got two more of these babies about to complete. Need to play through clusters or Spiral on High starlanes to see how much they are then...
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 12563
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: The Starlane Nexus

#2 Post by Geoff the Medio » Sun Aug 23, 2015 6:20 pm

MatGB wrote:it might be adding slightly too many lanes
Try adding a NumberOf clause to limit the number of lanes generated? And distance limits?
MatGB wrote:The effects description says it should cross an existing lane or go too close to an existing one, I'd say at the very least the lane that skims past Silk (with the pale blue fleet) and deeper into enemy space, as well as the lane 3 steps anticlockwise that also crosses through the system circle are too much.
Try adjusting

Code: Select all

const float MIN_PERP_DIST = 10
and

Code: Select all

const float MAX_LANE_DOT_PRODUCT = 0.98f;
in Condition.cpp

If they are working correctly, the first should be a minimum distance in uu, and the second should be a limit on how close in angle the lanes can be to existing lanes connected to either system with lower being a more-different angle. It's quite possible I have (more) mistakes in the relevant math, though.

I suggest also trying the Black Hole Collapser...

User avatar
MatGB
Creative Contributor
Posts: 3310
Joined: Fri Jun 28, 2013 11:45 pm

Re: The Starlane Nexus

#3 Post by MatGB » Sun Aug 23, 2015 6:54 pm

Geoff the Medio wrote:
MatGB wrote:it might be adding slightly too many lanes
Try adding a NumberOf clause to limit the number of lanes generated? And distance limits?
MatGB wrote:The effects description says it should cross an existing lane or go too close to an existing one, I'd say at the very least the lane that skims past Silk (with the pale blue fleet) and deeper into enemy space, as well as the lane 3 steps anticlockwise that also crosses through the system circle are too much.
Try adjusting

Code: Select all

const float MIN_PERP_DIST = 10
and

Code: Select all

const float MAX_LANE_DOT_PRODUCT = 0.98f;
in Condition.cpp

If they are working correctly, the first should be a minimum distance in uu, and the second should be a limit on how close in angle the lanes can be to existing lanes connected to either system with lower being a more-different angle. It's quite possible I have (more) mistakes in the relevant math, though.
This'd need recompiling, I'm backing up my autosave from last turn so I can test various iterations.
I suggest also trying the Black Hole Collapser...
It's being researched, but not as sure of the use case, my only black hole is deep in my territory and making them is a long job, if I find somewhere appropriate I'll give it a go.
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 12563
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: The Starlane Nexus

#4 Post by Geoff the Medio » Sun Aug 23, 2015 6:59 pm

MatGB wrote:...my only black hole is deep in my territory and making them is a long job, if I find somewhere appropriate I'll give it a go.
Artificial black holes should also work...

wheals
Space Squid
Posts: 88
Joined: Sun Mar 24, 2013 3:56 pm

Re: The Starlane Nexus

#5 Post by wheals » Sun Aug 23, 2015 7:16 pm

I think a distance limit in the script sounds like a very reasonable solution here, especially with the handy new mapscale circle feature (I keep meaning to make a patch to let that be enabled/disabled from the right-click menu...)
All my code and content provided herein or on GitHub is released under the GPL 2.0 and/or CC-BY-SA 3.0, as appropriate.

User avatar
MatGB
Creative Contributor
Posts: 3310
Joined: Fri Jun 28, 2013 11:45 pm

Re: The Starlane Nexus

#6 Post by MatGB » Sun Aug 23, 2015 7:53 pm

wheals wrote:I think a distance limit in the script sounds like a very reasonable solution here, especially with the handy new mapscale circle feature (I keep meaning to make a patch to let that be enabled/disabled from the right-click menu...)
alt+c does it FWIW, adding stuff to that menu is beyond me but figuring out how to set a hotkey was something I was just able to do in C++ ;-)

As to a distance limit? Um, yeah, y'know how I barely know how to actually script stuff? I gave up and instead set a max number of 10, which worked for the specific location in the picture.
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 12563
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: The Starlane Nexus

#7 Post by Geoff the Medio » Sun Aug 23, 2015 8:04 pm

MatGB wrote:As to a distance limit? Um, yeah, y'know how I barely know how to actually script stuff? I gave up and instead set a max number of 10, which worked for the specific location in the picture.
Something like

Code: Select all

        EffectsGroup
            scope = Object id = Source.SystemID
            effects = AddStarlanes endpoint = And [
                System
                WithinDistance distance = 200 condition = Source
                CanAddStarlanesTo condition = Source
            ]

User avatar
MatGB
Creative Contributor
Posts: 3310
Joined: Fri Jun 28, 2013 11:45 pm

Re: The Starlane Nexus

#8 Post by MatGB » Sun Aug 23, 2015 8:27 pm

That works, I'd been trying to use directdistancebetween because that's used in the code but it's a different thing, so I think I know where I was going wrong.

200 was too little for that place, 300 slightly too much, so I've put 250 into mine and I'll try it in more places (and more maps).

Related: Clusters galaxy map definitely has some issues in the generation, I suspect my current game would've been deathly dull without all the Bores I've used to open up new lines of attack. Which is fun, but a little unfair on the unsuspecting AI.
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

User avatar
MatGB
Creative Contributor
Posts: 3310
Joined: Fri Jun 28, 2013 11:45 pm

Re: The Starlane Nexus

#9 Post by MatGB » Mon Aug 24, 2015 1:44 am

Geoff the Medio wrote: I suggest also trying the Black Hole Collapser...
I got it researched and decided to simply plug it into my generator to see what it does. Fun.

Completely cutoff a cluster except for a lane I'd Bored out earlier, and it's too slow for strategic use for the way I play, but it's nice to see effects you can play with, might have to work on other things that can move actual systems around.
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

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

Re: The Starlane Nexus

#10 Post by Oberlus » Mon Nov 04, 2019 3:55 pm

The Starlane Nexus still produces too many starlanes and too close to other systems (even crossing over them).
Attachments
StarlaneNexusExcessive.png
StarlaneNexusExcessive.png (801.54 KiB) Viewed 329 times

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

Re: The Starlane Nexus

#11 Post by alleryn » Mon Nov 04, 2019 9:01 pm

Oberlus wrote:
Mon Nov 04, 2019 3:55 pm
The Starlane Nexus still produces too many starlanes and too close to other systems (even crossing over them).
Part of the problem here is that the dot product code that tests for angles is only testing for two starlanes that share an endpoint in common. In your diagram the code never checks the angle between the two starlanes:

Ster B --> Zosma A and
Deep Space system near Ster B --> Ra A, as these starlanes do not share an endpoint in common.

The proximity of Ster B to that Deep Space system makes the Ster B --> Deep Space look quite close to Ster B --> Zosma A, but if you imagine that line from Ster B --> Deep Space extending out, you can imagine that by the time it got to Zosma A, there would be a fair distance between the two starlanes.

Simplest solution is to cut the distance and/or increase the minimum angle. What Geoff suggested here:
Geoff the Medio wrote:
Sun Aug 23, 2015 6:20 pm
Try adjusting

Code: Select all

const float MIN_PERP_DIST = 10
and

Code: Select all

const float MAX_LANE_DOT_PRODUCT = 0.98f;
in Condition.cpp
The cosine of the dot product is the angle between the starlanes, so currently the minimum angle allowed is arccos(.98) = 11.5 degrees. In theory this allows up to 15 31 starlanes radiating out, which seems like a lot. I'd suggest adjusting the minimum angle to something like 30 degrees (change .98 to .87), which would allow for a saner (imho) maximum of 12 starlanes.

[Edited for a computational error and some additional minor clarification.]

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

Re: The Starlane Nexus

#12 Post by Oberlus » Mon Nov 04, 2019 10:48 pm

alleryn wrote:
Mon Nov 04, 2019 9:01 pm
I'd suggest adjusting the minimum angle to something like 30 degrees (change .98 to .87), which would allow for a saner (imho) maximum of 12 starlanes.
I've tested your suggestion. The number of starlanes is quite more saner indeed. The other problem you pointed out (not testing the angle with starlanes that does not share an end-point) is still there.
Would it be solved if the code would test for starlanes with same "start-point"? That starlane to the empty space, that was there before Nexus, has an angle well below 10 degrees to the newly created starlane Ster beta <-> Zosma betaalpha.
(I attach also a screenshot before Starlane Nexus is built.)

Edit: it's Zosma alpha, not beta.

Edit2: Maybe the problem is in ObjectTooCloseToLane(). I think it should be vetoing the starlanes Ster beta - Ra alpha and Ster bets - Zosma alpha. Going to try increasing MIN_PERP_DIST also.
Attachments
BeforeNexus.png
BeforeNexus.png (840.9 KiB) Viewed 310 times
StarlaneNexusExcessive087.png
StarlaneNexusExcessive087.png (663.13 KiB) Viewed 312 times

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

Re: The Starlane Nexus

#13 Post by Oberlus » Tue Nov 05, 2019 9:57 am

Attached an screenshot of the result using

Code: Select all

MIN_PERP_DIST = 30
MAX_LANE_DOT_PRODUCT = 0.87f
Some could argue 30 distance is too much, because it vetoes (by a slim margin) the starlane between Ster beta and Ra delta (the system NE of Ra alpha). But I actually like this. It allows the starlane between Ster beta and Ra gamma.

What do you (anyone) think?


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.
Attachments
StarlaneNexus_MIN_PERP_30_MAX_LANE_087.png
StarlaneNexus_MIN_PERP_30_MAX_LANE_087.png (804.16 KiB) Viewed 285 times

User avatar
em3
Vacuum Dragon
Posts: 605
Joined: Sun Sep 25, 2011 2:51 pm

Re: The Starlane Nexus

#14 Post by em3 » Tue Nov 05, 2019 11:11 am

Definitely looks better.
[...] for Man has earned his right to hold this planet against all comers, by virtue of occasionally producing someone totally batshit insane. - Randall Munroe, title text to xkcd #556

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

Re: The Starlane Nexus

#15 Post by Oberlus » Tue Nov 05, 2019 11:40 am

Oberlus wrote:
Tue Nov 05, 2019 9:57 am
Notice the absent starlane between Ster beta and the pale blue empty system in the SW corner.
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.
With MIN_PERP_DIST = 20 we get that Ster beta - blue pale empty space, but we also get Ster beta - Ra gamma (which I'd like to avoid).
I've tried reducing MAX_LANE_DOT_PRODUCT down to .50 but that removes the starlanes to Sulafat and Altair alpha (which I think are right) while Ster beta - Ra gamma is still allowed.
So I'm going with this:

Code: Select all

MIN_PERP_DIST = 20
MAX_LANE_DOT_PRODUCT = 0.87f

Post Reply