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?
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.
Develop games in your browser. Powerful, performant & highly capable.
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