Author Topic: Thoughts on map generation  (Read 1089 times)

0 Members and 1 Guest are viewing this topic.

Offline nakorkren (OP)

  • Commander
  • *********
  • n
  • Posts: 346
  • Thanked: 305 times
  • Gold Supporter Gold Supporter :
    2025 Supporter 2025 Supporter : Support the forums in 2025
Thoughts on map generation
« on: May 03, 2025, 04:23:23 PM »
I've been thinking more about the challenge of maintaining the galaxy map as you discover more and more systems and the connections get so complex and overlapping that it's hard to get them to lay flat-ish without a spaghetti mess of crossing lines.

Likely not everyone considers this a problem worth addressing, but it bugs me, so I was chatting with a friend about it. He pointed me to the Wagner Theorem, which states that "...a finite graph is planar if and only if its minors include neither K5 (the complete graph on five vertices) nor K3,3 (the utility graph, a complete bipartite graph on six vertices)." That got me thinking about changing the underlying map generation process as one route to making map maintenance easier: maybe when creating a new connection, the game could check the map to see if it would still meet the criteria of the Wagner Theorem above, and if not, roll again. Or possibly up to a limit before just accepting the result, to avoid getting stuck in an endless loop. This should, in theory, avoid lines crossing, or significantly minimize it, resulting in a highly planar map that would be easy for a force graph algorithm to lay out neatly.

I haven't yet tried to test this to see what maps built that way would look like, largely because while I can sort of half-way program, the time it will take to figure out the math involved is intimidating. Is there anyone on the forum already familiar with this kind of graph theory/math who can speak to whether this is likely to lead to maps with less (or no) crossings that would still be interesting to play?

Note that this idea completely ignores my other quibble with the galaxy map as implemented today, which as I've mentioned before is that because the map displays systems as nodes and gates as edges, which is the inverse of how long distance actually takes to travel (all travel distance is within systems; edge transit is instantaneous), it's really deceptive about travel time. I'm intentionally not trying to address that here, but wanted to at least note it in case someone was going to say "but what about when you said xyz".
« Last Edit: May 03, 2025, 04:36:18 PM by nakorkren »
 

Offline LuuBluum

  • Warrant Officer, Class 1
  • *****
  • L
  • Posts: 89
  • Thanked: 22 times
Re: Thoughts on map generation
« Reply #1 on: May 04, 2025, 12:34:28 PM »
Note that planarity checks are generally O(n) and rather nontrivial (note that Wagner's Theorem talks about minors, not subgraphs).
 
The following users thanked this post: skoormit