Which type of collider is better: Tilemap or sprite?

  • I see people using a sprite object as a collider, but this generates dozens of instances to cover the whole scenario with sprite collisions (for example, a blue block).

    Already if I use another collision-only tilemap with solid behavior, I will have two tilemaps in the scene, but the collision tilemap I put in a specific layer.

    Which is better to make the collisions of the scenario? Which one performs the best?

    In the construct 3 home screen demo game a sprite is used, with over 30 instances in the phase to cover the whole scenario. Is this how it is done? Or better to use a tilemap just for that?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • My guess is that TileMap should be better for performance. But you can actually test this - create a small map with sprites, run the game in Debug Mode and write down the number of collision checks per second. Then replace sprites with TileMap, check again. The less collision checks, the better.

  • In general, answer your own performance questions with measurements.

    And as usual, you probably won't be able to measure a difference, because optimisation is a waste of time until you have measurements identifying a specific thing that needs optimising.

  • Thank you Very much.I actually used the debugger and consumed less performance with tilemap. And it's also faster to make a tilemap part for collisions on a separate layer. I don't know why ex. of platform game from the homepage was made with sprites, generating many instances. Maybe you have better control over the placements, I don't know. but thanks

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