Android collision with many sprites in screen is eating a lot of frame time. How to improve?

Hi,

I have authored a tool for importing Spriter animations into UE4. Each part of the animation is a SpriteComponent. Everything I’m talking here is about 2D PaperSpriteComponents and “plane meshes”

I know at the moment the sprites are not being batched.

But the collision calculation performance is also really really bad !

My setup:

  • several sprites with custom geometry (not should be very expensive, only some extra vertices to the quad, hand made).
  • set all the sprites to overlap only with Pawn -ignore the others- and the Pawn to overlap only with WorldDynamic -ignore the others-
  • then, when I have on the screen a Pawn entity (made of ~10 spritecomponents) and ~10 WorldDynamic entities (made of ~4 spritecomponents) my Samsung Galaxy 3 performance go down … i got spikes of ~20 fps and the time of “Game thread” is increased by a lot.

If I deactivate the collisions (setting ignore to all in every sprite) I get a noticeable performance boost (like very stable 62 limit fps with spikes to 50)

If no other method is proposed, I will have to rely with very imperfect collision using only 1 poly per each entity -instead 1 poly for each part of the entity-.

Questions:

  • How can I profile the collision performance in the device? and see where are the bottlenecks?
  • How can I improve the performance of several collision overlap testing in screen?
  • Can I tune the time between overlaps/collisions updates ? What triggers exactly this function -so I could look if im doing something wrong-?

I have asked this in forum post: