Match Resolution

Match Resolution

Return to topic list

Wed Sep 4 17:38:03 2019   by   overlord
The match feature is very interesting. However, I'd like to be able to match maps a little bit better. There are lots of large lakes and islands that I cannot represent.

How can I use a 48x24 (double resolution) match file? Trying to do this currently ignores the last half of the characters.
 
Thu Sep 5 09:21:37 2019   by   Torben
Currently, the maps for matching have fixed size.  I will consider changing that in the future.  Until then, the best you can do is try a lot of different seeds until you get something close to what you want.
 
Thu Sep 5 16:21:54 2019   by   overlord
Code snippet from the readmap() function in planet.c:
----------------------------------------------------------------------
  Width = 48; Height = 24;
  for (j = 0; j < Height; j+=2) {
    for(i = 0; i < Width ; i+=2) {
      c = getchar();
      switch (c) {
      case '.': cl0[i][j] = -8;
break;
      case ',': cl0[i][j] = -6;
break;
      case ':': cl0[i][j] = -4;
break;
      case ';': cl0[i][j] = -2;
break;
      case '-': cl0[i][j] = 0;
break;
      case '*': cl0[i][j] = 2;
break;
      case 'o': cl0[i][j] = 4;
break;
      case 'O': cl0[i][j] = 6;
break;
      case '@': cl0[i][j] = 8;
break;
      default: printf("Wrong map symbol: %c\n",c);
      }
    }
----------------------------------------------------------------------

I've got two questions:

- Why do you use 48x24 and increment by 2, instead of using 24x12 and incrementing by 1?

- Why is the integer array (int c10[60][30];) initialized as 60x30? This means that the above readmap() function doesn't affect any points in the array past [48][24]. What about the indices between 48 and 60 in the x and between 24 and 30 in the y?
 
Thu Sep 5 17:55:22 2019   by   Torben
The increment of 2 is because I later interpolate the intermediate points.  The larger array size is "for historical reasons", i.e., I don't remember, but there probably was a different size once.  Parts of the program are 30 years old, so there is probably a lot of junk code.
 

Return to topic list



New message:
Topic:
Posted by:

Type the values of the dice shown below:

Return to topic list