Development of Manasource and anything else related to the Mana Project.
#134438 by Jaxad0127
Wed May 15, 2013 5:45 pm
Render optimizations have been discussed on IRC for the maps. I'll try to summarize what was said.

  • Rendering of all non fringe layers where all tile images used match the grid size can be optimized for the graphics hardware by not rending the tiles in (x, y) order but by rendering all tiles for a given tileset, then moving on to the next tileset and doing the same. This minimizes expensive texture swapping with no change in the resulting output.
  • We can also clear tiles on lower layers when upper layers completely cover them (100% opacity across the whole image). No need to draw what will be completely covered later in the same draw cycle.
  • A map preprocessor (that takes the original TMX files and output ones optimized for the first point) should be doable. All non animated tiles on non fringe layers can be merged into a two layers (one below fringe, and one above fringe) that uses a few constructed tilesets. The optimization from the second point would be handled here too.

There isn't much we can do to optimize rendering of the fringe layer, as it involves sprites and their untold image complexity, and a draw order that must remain (x, y) based.
#134439 by o11c
Wed May 15, 2013 5:48 pm
I still think this would be better done like this: https://github.com/bjorn/tiled/issues/431

Nonetheless, it *is* possible to get rid of all layers but ground, fringe, and over entirely in the client.

For the Fringe layer, you *can* stitch together images in the same row.
#134441 by Jaxad0127
Wed May 15, 2013 6:06 pm
o11c wrote:I still think this would be better done like this: https://github.com/bjorn/tiled/issues/431

I agree with what Bjorn said there. The preprocessor from point 3 would be part of the mentioned deploy step.

o11c wrote:Nonetheless, it *is* possible to get rid of all layers but ground, fringe, and over entirely in the client.

Animated tiles still present problems. An animated tile on ground layer 1 overlayed by a partially transparent tile on ground layer 2 presents issues. A preprocessor might be able to handle it nicely, though.

o11c wrote:For the Fringe layer, you *can* stitch together images in the same row.

True.

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest