Optimizing Tilemap Collisions

0 favourites
  • 4 posts
From the Asset Store
Enchanted Forest & Cave 16x16 Tilemap with Environment Sprites
  • So my game has about 40K-80K collisions per second, according to the debugger. Almost all of that comes directly from the tilemaps used to build my levels: if I remove the tilemaps, that number goes down to 300 or so. My tiles are 32x32, and my level is 5120x3072, with lots of terrain.

    Since I'd like to be able to make larger levels in the future, are there any ways to optimize tilemaps? Disabling collisions for tilemaps that are a certain distance from the player seems like the most basic approach, but the Tilemap object doesn't actually seem to include any way to disable collisions.

  • Can you send me your project to ashleyvsz@scirra.com? It sounds like a useful example for us to make optimisations to the engine.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Just a note, I have a grid of 32x32 sized tiles and if I edit the collision polys to 1 pixel smaller than the actual tiles themselves them seem to register collisions with each other and cause a massive spike collision checking.

    Hope it helps :)

  • Just a note, I have a grid of 32x32 sized tiles and if I edit the collision polys to 1 pixel smaller than the actual tiles themselves them seem to register collisions with each other and cause a massive spike collision checking.

    Hope it helps :)

    I haven't had a chance to send the fixed CapX, but my tiles are set up exactly the same way. Their collision boxes are all rectangles, but smaller than the tile size itself.

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