GameCult / Aetheria-Economy

Sci-fi ARPG made in Unity
Mozilla Public License 2.0
53 stars 9 forks source link

Better Star Maps Using Maze Generation #25

Open rwvens opened 4 years ago

rwvens commented 4 years ago

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.

rwvens commented 4 years ago

The current sector link generation takes place in Scripts/Editor/GalaxyEditor.cs:192-232

It would probably be a good idea to modularize this process, perhaps with a dropdown allowing the user to choose the algorithm.