WildCatNL
Posts: 513
Joined: 3/27/2009 From: Eindhoven, the Netherlands Status: offline
|
Here are the first results of a "map renderer" tool I've been working on. The tool simply renders a .png bitmap for a .fp9 "map values" file which resides in your FPRS/Maps folder. The tool is capable of rendering maps in different styles (for example, winter, summer, desert), and with or without certain overlays (1km grid lines, road names, hex ids). The first image shows Red Storm 11 (Rinteln) in game. The second image (next post) shows the seasonal variants (winter, summer, 'arid') it can generate today, for the middle part of "FPC Interactive Map" (Atteln). Maps take currently around 10 to 15 minutes to render, and I've been able to render all of the game's maps in three variants in the past 24hrs. The "map renderer" works as follows: it reads the "map values" from the .fp9 file, builds a terrain mesh according to the elevation values and obstacles. It then populates the terrain with houses, trees and roads, per terrain type and mobility/visibility values. Finally, it renders these along with shading, elevation lines and some grid and label overlays. It accepts themed palettes. It also takes hints for village names and road names (since that info isn't in the .fp9 file), including Umlauts and Ringelesses :). In the ideal case, this "map renderer" tool would allow one to by-pass HexDraw: you'd load up a 20km x 15km Google maps bitmap into the FPC "Map Editor", assign the values for elevation, mobility, visibility, tag cells for their terrain type and obstacles, and leave the rendering to the tool. However, there's still some work to do to get there. Some of it is easy (improving the fields and houses graphics, alining houses with road direction, halos behind the labels) and some is more complex. Especially "reconstructing" the road network has been in a pain in the behind, and you might spot a few misplaced junctions and missing bridges. As I understand it, the .fp9 map values file lacks info on how road run from hex to hex (through which hex sides roads enter/exit - 6bits would be sufficient). Instead, it just tells that a hex contains a road. Whether the road is connected to the road on the next hex, or runs parallel to it, is not recorded. That might make perfect sense for the game's AI, but I'm struggling to create plausible looking road networks. Although I don't expect the maps rendered by this tool to achieve the same quality as some of the artists on this form (hi Nick69), it might make map creation easier. Furthermore, the tool shows the map as the game sees it (once I get the roads in the right place). As a final note, here is an example of the hint data I create for the tool to label towns and roads. If you happen to have the same need for proper town and road names, please send me this kind of data, and I'll send you your map in return.
hints:
# NOTE: don't use a 0 prefix for cells on the first 9 columns!
"CA 2 Red Storm":
villages:
2204: "Vierden"
1509: "Klein\nMeckelsen"
1108: "Langenfelde"
1412: "Groß\nMeckelsen"
cities:
2213: "Sittensen"
highways:
322 : "A1"
1416: "A1"
2609: "A1"
4201: "A1"
major_roads:
4218: "N75"
2430: "N75"
minor_roads:
204 : "L124"
2406: "L130"
1923: "L130"
2029: "L130"
William
Attachment (1)
|