Shattered Kingdoms
https://www.shatteredkingdoms.org/forums/

World Map - Missing Islands
https://www.shatteredkingdoms.org/forums/viewtopic.php?f=26&t=26590
Page 2 of 2

Author:  Trosis [ Sat Sep 15, 2018 11:21 pm ]
Post subject:  Re: World Map - Missing Islands

I've been looking at the source of the world map page through Chrome.

Could you check blog.shatteredkingdoms.org/tiles and verify that you have the following .png files:
2_4_0.png through 2_4_6.png?

Code:
 lines 229 - 244
  // tile range in one direction range is dependent on zoom level
  // 0 = 1 tile, 1 = 2 tiles, 2 = 4 tiles, 3 = 8 tiles, etc
  var tileRange = 1 << zoom;

  // don't repeat across y-axis (vertically)
  if (y < 0 || y >= tileRange) {
    return null;
  }

  // repeat across x-axis
  if (x < 0 || x >= tileRange) {
    x = (x % tileRange + tileRange) % tileRange;
  }

  return {x: x, y: y};
}



In the first comment section of your code, it states that a zoom of 2 (which is as far out as we can zoom) the number of tiles is four. When we look at the available .png files it does not have 2_4_0.png.
So based on my findings, it appears as though any .png files from an x coordinate greater than 3 (while at zoom level 2) is missing.


I also think the issue could reside within the // repeat across x-axis section of the code. Since the image repeats, it isn't allowing these 2_4 png files to load in. I tried making a local copy of the page and changing the x if statement to work like the y if statement, but the map still wrapped.

Could you at least check for the missing png files?

Author:  Morovik [ Sun Sep 16, 2018 4:37 am ]
Post subject:  Re: World Map - Missing Islands

Seems fixed now.

Author:  Dulrik [ Sun Sep 16, 2018 10:14 am ]
Post subject:  Re: World Map - Missing Islands

Some discussion was taking place overnight to try to solve this. I am not sure it is actually 100% fixed yet, but kudos to the volunteers who are trying to make it work.

Author:  Trosis [ Sun Sep 16, 2018 2:26 pm ]
Post subject:  Re: World Map - Missing Islands

I’m so relieved! Thank you for making the efforts. I saw that it was down the other night and figured some folks were working on it.

Scrolling around appears to be a little bit buggy on mobile. But I’d rather struggle with scrolling and have the full map than to scroll easily and have missing sections.

Thank you again to all who put forth effort on this.

Author:  Trosis [ Sun Sep 16, 2018 2:58 pm ]
Post subject:  Re: World Map - Missing Islands

I was wrong. Full screen and single finger scrolling is operational and ideal.

Page 2 of 2 All times are UTC - 8 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/