Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
Here's code for "flag all the neighbors"
As for repeating 6 times - is that a sort of guesstimate that it's got a high enough chance to get things linked up? I'm not super familiar with the hyperlane generation strategy. I can say that the normal isolated Avatar system doesn't have this issue, since it' spawned by an event post-game-start.
1. Before removing hyperlanes, flag all the hyperlane neighbors
2. For every hyperlane neighbor, determine how many jumps are needed to get to each of the other neightbor systems - flag them with dynamic flags indicating the game thinks system A is between 2 and X jumps (10?) of system B.
3. Remove the hyperlanes
4. Go through each of the ex-neighbors and verify that each pair of systems that were within X jumps are connected within at least 2X jumps (or some other scaling factor)
5. Any system that can't reach all previously "linked" systems is then linked to the nearest (Euclidean) ex-neighbor to which it does not already have connection, and then checked again - until every ex neighbor can get to every other ex-neighbor (to which it previously had a path) within 2X jumps.
I suspect in most cases one 1-2 hyperlanes will need to be created to get everything fully connected. I am slightly worried that it could lead to a sort of "ring" that still doesn't connect to the galaxy at large.
So I don't think step 2 is worth measuring.
Also, IMHO you don't need to care about preserving relative distances. As long as the map can be traversed, to me it's playable.
Regarding the 'ring', it's not a concern. If the graph was connected (i.e. you could plot a path from any node to any other node) before removing the home system, then attaching each neighbor to any other node would result in an equally connected graph.
It would be 100% correct and preserve all connected paths to just link every ex-neighbor to the wormhole exit.
What I'm doing with the heuristic is trying to link fewer ex-neighbors to avoid pathological cases like being in the middle of a cluster, but ONLY ex-neighbors are ever candidates.
Only link (some) ex-neighbors and only link them to the wormhole exit system.
Green are the wormhole-connected systems, orange are the other ex-neighbors.
[edit] I'm concerned with "how can I write code to detect these scenarios" and I think the most reliable is to ensure every ex-neighbor has a path (whether direct or not) to the exit system.
I think that both orange systems should connect to the wormhole exit, and it's fine that they are technically already connected by a relatively long path.
Well, it sounds like your fix will solve the actual problem, so that's not bad at all. :)
https://i.imgur.com/4E9uAo9.jpg
Also, it looks like the game is willing to randomize more than 4 Jovian Leagues, but there must be something hard-coded to prevent more than one empire with the same start system from spawning (even when force-spawned). I am adding code to ensure it remains unlimited for random empires, which is the best I can do there.
I haven't pushed the changes to Steam just yet because I'm going to explore adding the suggested "Sol" variants.