Warp Point Connection Script

Home of SOLAR STARFIRE, 6th edition, rules based on the upcoming history of the Terran Solar Union.

Moderators: SDS Members, SDS Owner

Forum rules
1. Nothing obscene.
2. No advertising or spamming.
3. No personal information. Mostly aimed at the posting of OTHER people's information.
4. No flame wars. We encourage debate, but it becomes a flame when insults fly and tempers flare.

Try to stick with the forum's topic. Threads that belong to another forum will be moved to that forum.

Warp Point Connection Script

Postby Whitecold on Fri 11 Mar 2016 09:54

I wrote a small script in Mathematica for producing warp point connections for files from Elminster's universe generator. The default one tends to generate maps that are densely interconnected and does not produce any natural clusters, and while the many intersections of edges may be realistic from projecting a 3D structure to 2D, the map becomes very confusing to look at.

It tries to connect the warp points between one step of visibility. As it currently runs probabilistic, some WPs may remain unconnected if they did not find a matching one in 1000 attempts.
Rerunning the script overwrites previous output, but no input files are edited.

The core part of the script is the GetSysNumber[] function, which can be redefined to try out various possible algorithms.The parameters of algorithms can be adjusted as well.


The file:
https://www.dropbox.com/s/5itvzkgjrko1a ... or.nb?dl=0
Whitecold
Rear Admiral
Rear Admiral
 
Posts: 385
Joined: Fri 19 Sep 2014 15:03

Re: Warp Point Connection Script

Postby krenshala on Fri 17 Jun 2016 19:30

When I last wrote a galaxy generation script I had it pick a system, establish a single wp connection, then move to the next system numerically and repeat. It would then go through every system, skipping ones with no open warp points, until all warp points were connected.

This would give basically the same kind of evenly meshed output you are seeing, which is why I would also have it limit the "distance" (difference between source and destination system id) based on the warp point type with open having shorter range then concealed, concealed shorter than hidden, etc, but otherwise using the rules as written for determining what the destination system ended up being.

This is much more reliable in creating clusters of systems with a smaller number of long links between those clusters. The drawback is that you can end up with clusters not connected to each other. You fix this by manually adding new connections, of course. :roll:
-- krenshala
None survive the harvest!

Yeah, I'm finally back (again)! Sometimes, life (and 9yo son's) don't leave you time to play SF and earn a paycheck. :/

No, really! Matt actually made me an admin here!
krenshala
SDS Member
SDS Member
 
Posts: 2500
Joined: Thu 02 Jul 2009 17:13
Location: Austin TX, NorAm, Sol III

Re: Warp Point Connection Script

Postby Whitecold on Sat 18 Jun 2016 01:49

I saw the meshing happen with using the default range based system. (Throw a d20 for most of the connections) What happened is that a toroidal structure formed instead of clusters. More promising was setting a fixed cluster size, and then adding a penalty for connecting outside the cluster.
Another attempt was done with a 1/r^2 probability for connecting two systems, with various distance functions and prefactors.
Disconnected universes of course become a problem as soon as you get sufficient clustering, however mathematica can simply plot the graph and you can see if you are disconnected or there is a single line only, not optimal as well.
Whitecold
Rear Admiral
Rear Admiral
 
Posts: 385
Joined: Fri 19 Sep 2014 15:03

Re: Warp Point Connection Script

Postby Whitecold on Mon 15 May 2017 12:18

I rewrote the thing in python, which does not require a license:

Usage: python system_connector.py path/to/your/folder -c CONNECTOR

Current connectors: 'Default' 'Random' 'Cluster' 'LimitedCluster'

You will need to install networkx first

https://www.dropbox.com/s/6zvrwvi55kzl1 ... or.py?dl=0

If anyone has alternative suggestions for connectors, feel free to suggest them here
Whitecold
Rear Admiral
Rear Admiral
 
Posts: 385
Joined: Fri 19 Sep 2014 15:03

Re: Warp Point Connection Script

Postby Cralis on Mon 15 May 2017 16:50

I did a little Python back in school. Because white space = structure, it is so much more readable than most languages. So much better than VB.NET...

My obsession in WP linking has been in relation to real space mapping. It avoids the confusing confetti look of the types of linking discussed so far, and it makes links between systems the make astrographic sense.

I have not (yet) been able to program it, though several people have made some good suggestions on how it might be done.
Image
User avatar
Cralis
SDS Member
SDS Member
 
Posts: 9798
Joined: Tue 30 Jun 2009 19:27
Location: Oregon, USA

Re: Warp Point Connection Script

Postby Whitecold on Tue 16 May 2017 14:56

Cralis wrote:I did a little Python back in school. Because white space = structure, it is so much more readable than most languages. So much better than VB.NET...

My obsession in WP linking has been in relation to real space mapping. It avoids the confusing confetti look of the types of linking discussed so far, and it makes links between systems the make astrographic sense.

I have not (yet) been able to program it, though several people have made some good suggestions on how it might be done.


If you write down an algorithm, I can try it out in my script, or of course fell free to add it in your own. In the initialization function, some location can be defined, and then probabilities are calculated of that. (I tried out 1/r respectively 1/r^2 distance laws previously)
Whitecold
Rear Admiral
Rear Admiral
 
Posts: 385
Joined: Fri 19 Sep 2014 15:03


Return to Solar Starfire

Who is online

Users browsing this forum: No registered users and 2 guests