map format

Talk about everything related to CoCoNet or Colonial Conquest!

Moderator: Kroah

map format

Postby mael15 » 28 Jan 2012, 17:01

Kroah,
could you say something about the future map format? i thought if you are already planning to have editable maps in the next release, maybe you can share something about their design limits in advance.

i figured the original map is
- about 1280*466 72dpi
- ~120 countries
- only horizontal scolling
- 38 colors

i want to start on a map of the mediterranean and europe during the late roman empire and these questions come to mind:

a) how about the resolution of the map? i could work with the original 1280*466, but i guess it is not that difficult to have other sizes? ideal for my plans would be 1000*1000 px. i would stick to 72dpi to keep the original feeling.
b) it would be better if there was also vertical scrolling. then i could have more of scandinavia and england without having to cut off northern africa. is it possible? in the case of the mediterreanean there should be scrolling limits to all directions because there is an ocean in the west and land in the east, same with north and south.
c) keeping a simple color palette should also be good to keep the original feeling, ey? suggestion: http://en.wikipedia.org/wiki/X11_color_names. or maybe there should be no limitation and the designer of the map can choose if he wants to keep the look old school.
d) it would be realistic if not only mountains were unpassable for armies, but also rivers (i.e. the rhine) . but i am not sure if this would alter the game feeling too much?
e) optional feature to make it more realistic: the farther a navy move is, the weaker their attack value should become. this way one cannot attack jerusalem from london as easy as it would be now.

thanx and greets!
mael15
 
Posts: 30
Joined: 26 Nov 2011, 23:40
Location: Germany

Re: map format

Postby mael15 » 29 Jan 2012, 19:16

i isolated the graphical patterns of unoccupied countries for use as a photoshop paint bucket pattern for anyone who wants to create a map with the original colonial conquest feeling (like me :)): http://www.gemini-sites.de/coconetUnoccupiedPhotoshopPatterns.zip

i made this set of patterns with photoshop cs5. not sure in what other programs or ps version one can import them...
enjoy!
mael15
 
Posts: 30
Joined: 26 Nov 2011, 23:40
Location: Germany

Re: map format

Postby Kroah » 29 Jan 2012, 22:35

mael15 wrote:could you say something about the future map format? i thought if you are already planning to have editable maps in the next release, maybe you can share something about their design limits in advance.
Here's a short answer. I will give the full format in ~2 weeks. But you can still ask specific questions of course.
You can find the 3 original maps (standard, 1880 & 1914) using the custom format:
Standard.zip
(90.9 KiB) Downloaded 83 times
1880 The race for the colonies.zip
(91.81 KiB) Downloaded 66 times
1914 The brink of war.zip
(91.84 KiB) Downloaded 70 times

Be aware the format may change until release.
There are no limit to the number of countries, regions, majors, zones, etc...

There will be new features like:
- country patterns generated at runtime
- original or custom colors
- conquered country filled with a transparent color (using the country border)

mael15 wrote:i figured the original map is
- about 1280*466 72dpi
- ~120 countries
- only horizontal scolling
- 38 colors
Original map can be scrolled in both direction. I think your high resolution displays the whole height, so you can't scroll.
If you talk about wrapping, actually only horizontal wrapping is supported and can't be disabled. But i think adding an option to disable it soon.

mael15 wrote:a) how about the resolution of the map? i could work with the original 1280*466, but i guess it is not that difficult to have other sizes? ideal for my plans would be 1000*1000 px. i would stick to 72dpi to keep the original feeling.
Any resolution multiple of 16x8 is supported (the game uses 16x8 cells).

mael15 wrote:b) it would be better if there was also vertical scrolling. then i could have more of scandinavia and england without having to cut off northern africa. is it possible? in the case of the mediterreanean there should be scrolling limits to all directions because there is an ocean in the west and land in the east, same with north and south.
Tell me if i've already answered your question.

mael15 wrote:c) keeping a simple color palette should also be good to keep the original feeling, ey? suggestion: http://en.wikipedia.org/wiki/X11_color_names. or maybe there should be no limitation and the designer of the map can choose if he wants to keep the look old school.
Any color can be used (for the png or xml), but built-in constants (for original color) and html format can be used in the xml file.

mael15 wrote:d) it would be realistic if not only mountains were unpassable for armies, but also rivers (i.e. the rhine) . but i am not sure if this would alter the game feeling too much?
I think terrain hazards add strategic gameplay imho.

mael15 wrote:e) optional feature to make it more realistic: the farther a navy move is, the weaker their attack value should become. this way one cannot attack jerusalem from london as easy as it would be now.
Actually the game already implements something similar with regions.
The countries are splitted in 8 regions. An array gives the distance between the regions. Attacking with navy across different regions will delay the round they will begin to attack. Given that there are 9 battle rounds, if for example the distance is 4, the navy will attack for 5 rounds (round 5 to 9). If the distance is shorter (let's say 1), the navy will attack for 8 rounds, giving a stronger combat.
Kroah
Site Admin
 
Posts: 410
Joined: 07 Feb 2006, 01:01
Location: France

Re: map format

Postby Kroah » 30 Jan 2012, 02:19

mael15 wrote:i isolated the graphical patterns of unoccupied countries for use as a photoshop paint bucket pattern for anyone who wants to create a map with the original colonial conquest feeling (like me :)): http://www.gemini-sites.de/coconetUnoccupiedPhotoshopPatterns.zip

i made this set of patterns with photoshop cs5. not sure in what other programs or ps version one can import them...
enjoy!

Thank you.

There's already a feature in the next release which draws the country patterns for you:
- it uses a file "patterns.png". Example:
patterns.png
patterns.png (1.48 KiB) Viewed 1482 times
- a special color is used for the country border.
- for each country, the pattern & colors can be random (from the list <PaternColors>) or preset with fixed values.
- if random colors are used, an algorithm checks the average luma of the pattern is in the range [112;144] and that the delta between both colors is in the range [64;128].
Example with 3 countries "runtime generated patterns" (random & preset values mixed), the 4th country already contains the pattern:
Code: Select all
  <BorderColor>#000000</BorderColor>
  <FillAlpha>0.8</FillAlpha>
  <PatternColors>Black01,DarkGrey,Red,Green,Brown,Blue,White,DarkBlue,Grey,Cyan,Turquoise,Yellow,Purple,DarkYellow,DarkPurple</PatternColors>
  <Fills>
    <Fill Index="0" AreaIndex="0" OffsetX="0" OffsetY="0">
      <Pattern ImageIndex="[1;23]" PatternColorIndex1="[0;13]" PatternColorIndex2="[0;13]" />
    </Fill>
    <Fill Index="1" AreaIndex="1" OffsetX="0" OffsetY="0">
      <Pattern ImageIndex="5" PatternColorIndex1="2" PatternColorIndex2="3" />
    </Fill>
    <Fill Index="2" AreaIndex="2" OffsetX="0" OffsetY="0">
      <Pattern ImageIndex="7" PatternColorIndex1="[0;13]" PatternColorIndex2="[0;13]" />
    </Fill>
    <Fill Index="3" AreaIndex="3" OffsetX="-48" OffsetY="0" />
  </Fills>


Two kinds of fill method are available (a map can't use both method):

1) original method (to be compatible with original map): a first fill is applied with the first or second color, then a second fill is done with the conqueror color.
With this method, the countries should already be filled with the patterns. Those patterns must be hand edited to make certain the fill will not be stopped by the other color of the pattern (mainly a problem on the borders).

2) new method (easy way, recommended): the map picture uses a defined color for the borders not used anywhere else. The fill algorithm overwrites all the color until it reaches the border color. No need to fill with a first color.
With this method, the patterns can be filled at runtime when loading the map with random or preset patterns/colors. In this case, the map.png does not contain any pattern inside the countries.
You can still draw yourself all the patterns too, or make a mix between both.

If you don't want to keep the original feeling (=no patterns=, you can draw the countries by hand, put some trees and mountains in it, draw the borders with a unique color and use the second method to fill the countries when conquered with a translucent color.
If you don't want to use pattern for countries, you can put only 1 plain pattern in pattern.png.
Kroah
Site Admin
 
Posts: 410
Joined: 07 Feb 2006, 01:01
Location: France

Re: map format

Postby mael15 » 30 Jan 2012, 10:33

aaaaaah, that looks really good! i am looking forward to using all this!
i would offer to make a gui editor that can load a map, have the user make all the settings and then create the xml file. or are you planning to do this yourself?

it is amazing how much work you put into this! PROPS!
mael15
 
Posts: 30
Joined: 26 Nov 2011, 23:40
Location: Germany

Re: map format

Postby Kroah » 05 Feb 2012, 17:54

For curious, here's a sample of a custom map with random generated patterns (using tha original map), trying to keep the original Colonial Conquest feeling:
Map - CoCoNet - with Patterns 02.png
Map - CoCoNet - with Patterns 02.png (84.09 KiB) Viewed 1456 times

The patterns are generated at runtime using some predefined values in the map.xml and the patterns.png shown in the post above with the map.png below:
Code: Select all
  <PatternConfig>
    <Colors>Black01,DarkGrey,Red,Green,Brown,Blue,White,DarkBlue,Grey,Cyan,Turquoise,Yellow,Purple,DarkYellow,DarkPurple</Colors>
    <Default ImageIndex="[1;23]" PatternColorIndex1="[0;14]" PatternColorIndex2="[0;14]" />
    <Seed>10</Seed>
    <Luma Red="0.30" Green="0.59" Blue="0.11" />
    <AverageLuma Min="112" Max="160" />
    <DeltaLuma Min="80" Max="224" />
  </PatternConfig>

The map.png used was the following:
Map - CoCoNet - for Patterns.png
Map - CoCoNet - for Patterns.png (48.06 KiB) Viewed 1456 times
Kroah
Site Admin
 
Posts: 410
Joined: 07 Feb 2006, 01:01
Location: France

Re: map format

Postby mael15 » 05 Feb 2012, 18:11

nice one, fresh feeling to the good old world map!
my map of ancient europe is coming along well also, hopefully finished next weekend.
mael15
 
Posts: 30
Joined: 26 Nov 2011, 23:40
Location: Germany

Re: map format

Postby Kroah » 07 Feb 2012, 12:54

To help debugging custom maps, some verification are done when the map is loaded.
A short message explaining the problem is displayed if:
- an element is not of the expected format and type (integer, string, list, color...).
- a given element references a non-existing element (ie. an area is defined with a RegionId=X, but this region is not declared in the region list).

mael15 wrote:nice one, fresh feeling to the good old world map!
my map of ancient europe is coming along well also, hopefully finished next weekend.

To handle this kind of map, a new element in the map.xml disables the horizontal wrapping.
I don't mind adding a feature to enable vertical wrapping, your thought ?

mael15 wrote:i would offer to make a gui editor that can load a map, have the user make all the settings and then create the xml file. or are you planning to do this yourself?

I've planned to do a graphical editor, but as long as the map format is evolving, it's better to use a text editor imho.
The map format is not that difficult, but implementing an easy way to edit the map is not trivial either, especially when the map format changes at each release.

I actually use a simple viewer i made to check the map without launching the game. Even if it can't edit anything, it allows you to have a visual feedback of the custom map while you edit it with a text-editor. A refresh button reloads the map with the last modification made. Simple, easy and it works (for us knowing what xml means of course).

Edit: Can anyone tell me who plays CoCoNet with the name "klausi" ?
Kroah
Site Admin
 
Posts: 410
Joined: 07 Feb 2006, 01:01
Location: France

Re: map format

Postby mael15 » 07 Feb 2012, 13:22

Kroah wrote:I don't mind adding a feature to enable vertical wrapping, your thought ?

i think this would help with a totally made up map, if it is not too much work...

Kroah wrote:I've planned to do a graphical editor, but as long as the map format is evolving, it's better to use a text editor imho.

i agree. i am just not looking forward to counting 16x8 pixel quadrants for placing the clickable rectangles etc. so i thought some easy clicking on a map would make creating the xml file a lot easier.
my idea was to help you focus on the xml format and the game. you could make progressing versions of the xml file and send me the changes so i can implement them in the editor. but if you have the time and like to write the editor yourself it probably is for the best since you know everything about this inside out.

Kroah wrote:I actually use a simple viewer i made to check the map without launching the game.

great! would you share it?
mael15
 
Posts: 30
Joined: 26 Nov 2011, 23:40
Location: Germany

Re: map format

Postby Kroah » 07 Feb 2012, 15:11

mael15 wrote:
Kroah wrote:I don't mind adding a feature to enable vertical wrapping, your thought ?
i think this would help with a totally made up map, if it is not too much work...

I will add vertical wrapping, but it will not be possible to enable both wrapping mode due to technical constraints.

mael15 wrote:i agree. i am just not looking forward to counting 16x8 pixel quadrants for placing the clickable rectangles etc. so i thought some easy clicking on a map would make creating the xml file a lot easier.
Yes, you're right. The viewer allows to easily read the cell coordinates and type them in the xml.
When building a map with the viewer, i follow the following steps:
1) I add an area (<Area>) with its properties, then refresh the viewer
2) I add the adjacent zones (<Zone>) & the links to the area (in <AdjacentZonesId>), then refresh the viewer
3) Same for the adjacent areas (<Area> & <AdjacentAreasId>)
4) and so on...
This way i see the map grow bit by bit and i fix the xml as soon as i see an error.

mael15 wrote:my idea was to help you focus on the xml format and the game [...]
I understand, thank you.
I don't think i will do a visual editor soon. The viewer is enough for most users. But i'm not against it in the long term.

mael15 wrote:
Kroah wrote:I actually use a simple viewer i made to check the map without launching the game.

great! would you share it?
Yes of course.
It will be available with the beta & final release.
I'm still adding features to it while building the sample map.
Kroah
Site Admin
 
Posts: 410
Joined: 07 Feb 2006, 01:01
Location: France

Re: map format

Postby mael15 » 08 Feb 2012, 17:29

kroah,
i am planning the sea areas for my european map. i was wondering if they have any meaning at all? i mean the smaller areas with the dotted lines, not the bigger regions.
and the bigger regions only have an effect on the returning troops from a tropps attack with ships, right? so no use with army only attacks on land?
thanx!
mael15
 
Posts: 30
Joined: 26 Nov 2011, 23:40
Location: Germany

Re: map format

Postby Kroah » 08 Feb 2012, 22:42

mael15 wrote:i am planning the sea areas for my european map. i was wondering if they have any meaning at all? i mean the smaller areas with the dotted lines, not the bigger regions.
Those smaller regions are called "Zone" in the map.xml. They only give a visual indicator of the naval strength according to the other areas adjacent to this zone. This is the only meaning.

mael15 wrote:and the bigger regions only have an effect on the returning troops from a tropps attack with ships, right? so no use with army only attacks on land?
thanx!
Those regions are used:
- to give a $ bonus to the player owning all the countries of a given region (up to $11.900.000 per region, whatever the region is)
- to know the distance between 2 countries (distances are set for all pairs of regions), this distance determins the starting round of the navy attack.
- and like you said, the remaining army of a navy attack is lost if attacking from a different region (-> don't attack with navy full of army from a different region).

And you're right about army moves, the regions have no use of them.
Kroah
Site Admin
 
Posts: 410
Joined: 07 Feb 2006, 01:01
Location: France


Return to CoCoNet Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron