Campaign Day Map

The Campaign Day Map started out very simple – I wanted to create a map of linked nodes, but didn’t want to spend too much time on what is, essentially, a framework for the important part of the game. Initially the visual representation was not a simulated terrain map, but rather a diagram of the nodes and their links:

Luckily I soon replaced this with a randomly-generated map of terrain areas in the form of a Voronoi diagram. This works well since it looks like the fields and forests of France, most of which were laid out before modern surveying technology and don’t use a lot of straight lines.

Right now for Alpha 7.1 I am working on improving the generation of the campaign day map. Firstly, whereas in the past only the area centres were saved and the actual character painting of the map was redone each time a saved game was loaded, now every single character in the map will be generated once, and then saved. This means that screenshots of the ‘same’ map between two gaming sessions will look identical, except for changes in area control, player position, and so on. The terrain itself will remain static.

This also lets me play with the procedural generation of the terrain itself. The road generation was never something that I was completely happy with. It tended to produce a lot of triangular road webs that look completely unrealistic. Now I am using an old A* pathfinding implementation that I had written for a previous unreleased game to improve roads in ArmCom.

The map generator will determine whether there is a vertical and/or a crossroad, select a start and end node, and then lay it out to connect the two nodes, avoiding forest tiles for the most part. After the main road or roads are in place, villages will be joined to them by dirt roads, and nodes with farmhouses will have a small chance of having a dirt road connecting them to the nearest branch of the network. In this screenshot I have temporarily displayed the F scores of each node for debugging purposes.

Next up I will have the map generator determine the resistance level of each node when the map is generated, rather than rolling for it when the player checks or moves into a new area. This will allow me to normalize the average resistance level in a map, as well as lay the groundwork for future campaign events. Looking further ahead, new area types such as lakes, swamps, and hills are on the drawing board, as well as a special bocage area that will only show up early in the American 4th Armored campaign.