Auto-translated
Lux in tenebris, how did you manage to get this program working? It immediately crashes on my Windows system.
Work on the generator is progressing slowly, but it is. I think it's still better than nothing. I'm not posting screenshots of the generated maps yet because they are still far from being as good as even a regular generator, let alone an advanced one, which many are waiting for. I'm not focusing on testing because I'm spending more time on the (de)generation algorithm right now. I'm providing a rough plan for map creation and typical problems with the standard randomizer below, in case anyone is interested in the process. (Sorry, I couldn't find how to remove the text by category here.)
------
Castles
------
1) Depending on the player's instructions regarding the location of their castle, a section is determined (9 squares:
north-west, north, north-east
west, center, east
south-west, south, south-east)
2) If Random is selected, the program chooses a random square and a position within it that is not too close to the edge of the map, always with some space on the sides.
3) Subsequent castles should not:
- be closer than n positions to each other. Enemy castles are placed at the maximum permissible distance or close to it to avoid "childish frustration."
4) If the map is small or there are many castles close to each other, the generator marks them as "open," which then need to be "closed" with terrain (mountains, trees, etc.). This also means that approaching the castle will take some time.
Castle placement options (templates):
If there are 2 castles (initially occupied by players), they are placed in opposite squares (north-west and south-east, for example) or simply on opposite sides (north and south, it doesn't matter where exactly).
3 players and 3 castles - options that have the longest path between them. The castles of 2 out of 3 players should not be located too close to each other, although there will also be no symmetry.
4 players can be located in such a way that one pair can be close to each other. In general, there is no strict distribution. Random positions.
As the number of players and their castles increases, a landscape labyrinth system needs to be implemented, i.e., the path from castle to castle should be increased by adding detours.
-----
Land
-----
1) The land around the castles is placed according to the options set by the players. If not, it is randomized.
2) First, templates are reviewed. Based on the presence of water on the map (land or island system), a group of suitable templates is selected. Everything is clear with land; islands are taken from templates + transitions between land are generated and the space of the islands is expanded/reduced.
3) To avoid glitches with single cells and isolated areas, the generation of land is not done separately, cell by cell, but according to the principle of expanding an area in different directions (the central cell analyzes each cell clockwise around it, and something is placed there). For example, several islands can grow and merge into one large continent.
4) The generation of land and islands is subject to the following rules:
- Do not place single, isolated cells (an island of 9 cells in a 3x3 row is not serious).
- Ensure that all land is used, provide transitions, and avoid "dead," meaningless zones and long, narrow bridges.
- Islands consisting of fewer than n cells are meaningless.
Such an island can be connected to the main continent with a "bridge."
- Create transitions from Dirt type land to connect "pure" types of terrain and Beach only for the coastline.
-----
Paths and Roads
-----
1) The transport network (explicit and implicit roads: asphalt, paths, passages, trails, etc.) is created based on a large assortment of templates, which are shuffled with each other to produce a final mixed result.
2) At the same time:
- Each castle (if desired; except for neutral ones) receives access to the main (explicit) road.
- The templates use not individual cells-positions of the road, but rather large areas (to avoid inconsistencies). All elements of this "puzzle" are connected to each other by generated transitions.
3) The second option for building a transport network is to generate the road "on the fly," i.e., by analyzing the route of the path based on the 8 cells closest to the center. This was rejected because it does not guarantee harmony and integrity of the map.
-----
Landscape
-----
1) Individual, small areas of landscape taken from library templates (a forest of several trees, a rocky ridge, other ensembles, etc.) are placed on the map in accordance with the surrounding area (the principle of analyzing neighboring areas for compatibility of nature).
2) At the same time:
- Landscape elements (LE) are placed WHOLE, depending on the adopted transport system, to ensure normal passage through the land.
- LE should create convenient hiding places and be as involved as possible in the game. That is, if it is a forest, then there should be a sawmill somewhere in it; if the rocks do nothing, then there should be a mine or fort or any other object under them, etc.
----------
And a couple more flaws that the standard generator allows (minor, but annoying):
----------
1) Resources and, even worse, artifacts are easily accessible from behind monsters. :) I think everyone has used this, but it's not quite right.
Visible solution: place the "monster + treasure" combination with the treasure in an inaccessible area without passing the battle with the monster. Again, try to analyze the landscape and "adapt" the entire treasure to it.
At the same time, if the monster is at the beginning of a transition, behind which there is a resource and (possibly) an enemy castle, close the transition on both sides with monsters of equal strength. I think that's fair.
2) Temporary unavailability of essential mines. Perhaps problem number 1, which reduces the beginning of the game to a stupid search for resources with troops of the first levels.
Visible solution: analyze the area adjacent to the castle for a suitable place to place a mine or sawmill. At the same time, the path to them should not cause serious difficulties (although, it depends on the difficulty level). The guard of the mine, in the case when the latter is located very close to the castle, is symbolic. Further - a freebie, i.e., without a guard on the medium difficulty level.
3) One or two active elements on the map (buildings, artifacts, monsters, resources, etc.) are sometimes located in dead zones, where it is either impossible to get to, or there is no point in it.
There is no guaranteed solution yet. Most likely, somehow analyze the landscape and everything related to the place where we are going to put the element.
4) Uneven distribution of encountered resources and monsters. Lack of a sufficient number of initial resources or some kind of mine in your area. Lack of mines with specific resources needed to build your type of city. Uneven distribution of mines on the map, when one castle has a lot of them, and the rest have very few.