I am trying to get a smoothly scrolling super high definition custom Map with Tiled.
My problem is, that I don’t have an image of the original map at all. All I have to work with are all Tiles of that Map on a server.
Let me explain:
The Map is a render of an in game map.
I have following URLs:
where the numbers represent the Zoomlevel and x / y coordinates.
Here a little table.
2 - 4 x 4 (0 to 3)
3 - 8 x 8 (0 to 7)
4 - 16 x 16 (0 to 16)
5 - 32 x 32 (0 to 31)
6 - 64 x 64 (0 to 63)
7 - 128 x 128 (0 to 127)
8 - 256 x 256 (0 to 255)
9 - 512 x 512 (0 to 511)
Which means those are 262.144 Tiles on highes resolution.
I know there is no file format supporting this large of an image, thats why I need your help! What do You think, how can I accomplish a seemless scrolling experience with pan and zoom for iOS?
Hope You can help me!
So do you need them as a combined map? In that case you could simply combine the tiles in a graphics program, save the result as an image.
This is the exact opposite of what you said above. Please clarify what you have and what you intend to do.
I believe that if you intend to load those tiles on the fly as the user zooms in/out then you will not have a good user experience. Like zooming on Google Maps on a slow connection (ie Edge). Even if you cache the images locally, loading them from flash memory will add a noticable delay.
Sounds to me as if the real problems will be connectivity, and memory usage for the “mipmap” tile textures, specifically since you say something like “super high definition” then I’m thinking at least 256x256 pixels per tile image at the highest resolution.
How large exactly? You only gave numbers for the tile layers, but not the size of the tile images themselves. And how many of them.
Also, with PNG and JPG you can in theory save really large (if not infinitely large) images. That is not going to be an issue. The real problem is that older iOS devices only allow for textures to be 2048x2048 in size, if I remember correctly 4096x4096 texture sizes are possible beginning with iPhone 4 and iPad 2.
Do a simple calculation to see if what you’re trying to do is feasible, memory and load time and data transmission/fees wise:
ImageWidthInPixels * ImageHeightInPixels * 4 (Bytes) * NumberOfUniqueTiles = TextureMemoryInBytesForOneSpecificLayer
Add the numbers up for each mipmap layer to get the total memory usage for uncompressed textures. Compressed textures can save 2-20 times that, but you’d have to test these for their pros and cons and actual compression ratio.
I don’t have them as a combined map.
Well the Map I try to create is just a map of an game. Thats what i wanted to say. I mean it is not a real Map or something.
Yes, I know. There will be a delay. If I get a result like in GoogleMaps it would be perfect!
Sorry, I forgot to write them in here. Okay, so the Tilesizes are 256x256 pixels on every zoom level.
With your calculation it adds up to 64gigabyte of Data on the largest zoomlevel.
But keep in mind, with an Image that big (131.072x131.072 pixels on highest Zoom) you probalby won’t be scrolling through all of the map.
Thank You for your detailed and fast answer!