Misusing Tilemaps

0 favourites
  • 5 posts
  • After (of course) developing 50% of my pretty large game, I've finally read something about tilemaps that worried me. I was using them to get tons of variation on almost every tile (ie platform floors with 3-4 variants, BG walls with 6-7 variants, windows that are 4-6 tiles wide/long, etc.), but I'm realizing for each next different tile it has to issue a whole new draw call. So a window in the background, even though its really only 4 tiles, it has to render 4 draw calls instead of having a single sprite of a window and only doing 1 draw call.

    Now, my levels aren't HUGE, per se, but some of them have a lot of variations going on and nothing is really being "tiled". Is this something I should go back in and look at, or because it's pixel art it's not a huge deal? Or am I (once again) misunderstanding how the tilemaps are supposed to be used?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • unless things have changed then

    draw calls are per rectangle of repeated tiles

    [quote:277azksy]Therefore to optimise this, the Tilemap plugin searches the tilemap for areas of repeated tiles. It identifies the largest rectangles it can where the same tile is repeated, and remembers these. When it comes to be drawn, it draws the whole rectangles at a time rather than going tile-by-tile.


    So I suppose if your windows and walls are not at least partially using adjacent repeating tiles then it may not be the best option.

  • NetOne - right. That's where I read that. I guess my question is "will doing all the legwork to fix it be worth it?"

  • Personally I would crack on with the game then if you start to hit GPU ceiling on your target devices maybe think about optimising these sort of things.

    Thing is that unless you are wanting to deploy to old mobiles or trying to render crazy amounts of sprites then most GPUs are so powerful these days that, especially with browser based games using webgl, you are more likely to hit CPU ceiling first.

    I'm no expert though.

  • NetOne - yeah that's what I worry about. Would this affect the GPU fillrate? Because if it does, it's already hampering slower machines and needs to be taken care of.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)