Generating links between stars is currently rather ad-hoc, randomly selecting a link and then pathfinding to check whether this results in an isolated region, repeating until the goal sparsity has been reached or no more links can be removed. This is slow, inefficient, and does not give much control over the connectivity of the resulting star maps.
A better idea would be to use classical maze generation algorithms such as Recursive Backtracking.
Generating links between stars is currently rather ad-hoc, randomly selecting a link and then pathfinding to check whether this results in an isolated region, repeating until the goal sparsity has been reached or no more links can be removed. This is slow, inefficient, and does not give much control over the connectivity of the resulting star maps.
A better idea would be to use classical maze generation algorithms such as Recursive Backtracking.