Phone overheating

I’ve been searching for info on this but haven’t really found anything that helps yet. Several of my games seem to cause the phone to heat up over time. I have played other similar games from the market on the same phone and no heat problems. Trying to figure out why mine do. Most important is my latest game;

What should I look at? all I have seen is “too much calculation” - not sure how to reduce that - lots of sprites that need collision. Maybe the laser fire calculations? I also do a number of invisible overlays that I fade on at points - does it matter if there are invisible display groups on screen?

Your problem is too much work/inefficient code.

For example, say you have 20 objects and you’re running 60fps and you are collision checking per frame. Then you will have 20x20x60 collision checks per second!

So maybe check only objects within 50px of the object (being checked) and then only check say every 5 frames.

I did some things around collision checking and it reduced the heat…a bit…but phone still quite hot. Are there any other areas of code that cause phone overheating? I feel like there is not much more I can do with collision checking, as this is the game really.

Do you pooling objects?

No, I have on other projects, but haven’t on this one. This would work really well with what I’m doing I think - thanks for the suggestion!

1 Like