Skip to content

Плагин Fresh Mod для SOD

User Avatar
#208
Auto-translated
There are improvements to the pathfinding.
I managed to figure out the road generation.
The current algorithm connects each city to every other city within a double loop.

As an alternative, I created an algorithm that strictly follows the connections of the map template when generating roads.
First, the central cities of the zones are connected according to the template.
Then, the remaining cities are connected to the central city of their zone.
This algorithm is perfect for the JC map.
However, it's questionable for the other templates, as now each connection between zones creates a road.
On 6lm10a, this might not be so bad – red and blue always have at least two roads: to the local treasure and to the adjacent zone.
But on the diamond map, it's already doubtful.

Advantages of this algorithm:
- Red and blue are guaranteed to have good roads.
- Roads strictly follow the map template.
Disadvantages:
- On templates with a large number of connections, many roads appear.

Therefore, the following questions arise:
1. Is this algorithm better than the current one?
2. What are some ideas for improving the current algorithm?

I have data on the zones, their connections, the coordinates of the cities, and the ability to build a road from any point A to any point B.
I have all of this, so I can implement almost any algorithm.

The DLL is attached, which allows you to see the result of the new algorithm.
The installation process is the same:
Unzip the archive in the attachment into a new folder in: "...\_HD3_Data\Packs", then connect this folder in the HD mod launcher window.
Attachments 1
1 file attached • Total size: 14.5 KB