Automatically turn assets into tiles to help with rendering performance

One of the most common issues I see people ask for help with is when they have a map with assets that are too large. These large assets (often upwards of 10 MB in size) are difficult for the browser to render.

The solution for this problem is to split the large asset into tiles of no more than 1 MB in size, upload each of these tiles, and manually arrange them into the appropriate shape on the map. This is doable, but a bit of a hassle, and on particularly large maps requires manipulating dozens of tiles. For people with particularly low end computers, especially those with lower resolution monitors and without discrete graphics cards, even smaller map tiles are ideal.

What I would like to see is one of two things:

  1. Option the first: for all assets greater than a certain size, automatically convert these assets into tiled assets on the back end, treating them like they’re not tiled on the front end.
    1. The GM, when building or editing a map, sees a single asset
    2. The server stores this single asset as multiple smaller files and sends them to the clients as normal small files
    3. The clients render these small files appropriately, completely unaware that they’re supposed to be one asset.
    4. Pros:
      1. Easy as possible for the GM, because it requires nothing on their part.
      2. Once functional, it’s basically foolproof.
    5. Cons
      1. Determining where to actually do this split would be difficult.
      2. If the client does it, then saving assets will take time and feel slow or laggy.
      3. If the server does it, then it is likely a non-negligible load on the server.
  2. Option the second: the map editor prompts the GM to tile their larger assets.
    1. In the editor, possibly when the asset is imported, large assets are flagged somehow.
    2. The asset properties or the right click context menu for the asset has an option to convert it to tiles.
    3. This one’s easier to show than tell, so I included a very rough mockup of what the UI might look like.
    4. Pros
      1. Easier for the GM to configure to be exactly what they want.
      2. Easier to see that it’s been done.
    5. Cons
      1. Possibly easy to miss in the UI.
      2. Probably easy to misconfigure or configure in a way that’s less optimal (too many tiles, not enough tiles, etc).

Now that I’ve typed all this, I think actually combining both of these options would work well - automatically convert larger assets, but also give the GM a UI to see and edit the tiling.

Of course, none of this would really be viable for video - synchronizing even 2 video files is groady, let alone the dozens you can get in a tiled image asset.