Tilemaps for large levels improve performance VS sprites?

0 favourites
  • 7 posts
From the Asset Store
Firebase: Analytics, Dynamic Links, Remote Config, Performance, Crashlytics on Android, iOS & Web Browser
  • Hi everyone,

    If I want a platformer with large levels, will using the tilemap object (seamless mode on) improve performance over using sprites for all the tiles to create the level?



  • Yep(at least for my platformer game). It's far better and less object for C2 engine to handle. I've encountered this issue and immediately change to tilemap for better performance.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Immensely. Especially when paired when rendering cells, if used properly.

  • While tile maps don't benefit from render cells, they work in a same way with collisions cells, and so, by default, tilemaps are scalable easily to a far larger world size than the screen.

  • Thanks very much everyone for confirming this. I wanted to assume as much, but it was strange that in the official documentation for Tilemap they neglected to point out the performance benefits. They should really mention that near the top of the Tilemap extension page.



  • One of the advantages of the tilemap object is that it effectively uses render cells internally all the time regardless of the layer's 'Use render cells' setting. The layer setting applies to entire objects, but tilemaps are often so large they sit in every render cell and negate its performance benefit. So to avoid that the tiles are internally split up in to cells and only ones touching the viewport are iterated.

    It also works with collision cells in a similar way, and that works especially well when you don't change the collision poly for tiles, since it can take entire rectangular areas of different kinds of tile (assuming they all use full-tile collision), and test them as a single box.

    So even if you have an extremely large tilemap object covering a huge layout, it still collision checks and renders efficiently. This is still possible to achieve with other objects, but harder. I added a note about the performance benefits to the Tilemap manual entry to highlight this.

  • Thanks for the info Ashely, and for the awesomeness that is C2.



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