How do I reduce heat of iPhone 6 C2 game

Get help using Construct 2

Post » Sat Jan 30, 2016 1:45 pm

My game is getting hot. Not too hot so I can't hold the phone, but quite hot. I haven't seen a 2D game on iOS that does this.

What causes this CPU overload or GPU? VRAM overload?
What should I focus on, reducing number of objects (100 objects for now), reducing number of events running constantly? Reduce VRAM (25mb as of now)?

Which would cause most problems in terms of heat?

BTW Game is running oh so smooth at 60+ FPS 99.9% of the time.

Thank you
B
33
S
4
G
1
Posts: 272
Reputation: 2,500

Post » Sat Jan 30, 2016 3:47 pm

damjancd wrote:My game is getting hot. Not too hot so I can't hold the phone, but quite hot. I haven't seen a 2D game on iOS that does this.

What causes this CPU overload or GPU? VRAM overload?
What should I focus on, reducing number of objects (100 objects for now), reducing number of events running constantly? Reduce VRAM (25mb as of now)?

Which would cause most problems in terms of heat?

BTW Game is running oh so smooth at 60+ FPS 99.9% of the time.

Thank you


HTML5 is already known as heavy load to mobile devices and one of the biggest load known that can be optimized is the collisions. I believe CPU causes more heat on Iphone's than GPU's. So this will be your first step in great optimization.

I suggest you follow this tutorial.
https://www.scirra.com/tutorials/925/mo ... ance-boost
Image



The Things you can create is only limited by your imagination. If you don't have the skills then use your motivation as a natural force to exceed all expectations. Chadori RebornXD
B
51
S
17
G
90
Posts: 1,108
Reputation: 59,024

Post » Sat Jan 30, 2016 6:39 pm

@chadorireborn Thanks. Will check that out. I have barely 30 ticks for collision checks. But will try to bring that down. I have a few ideas on how to disable physics on anything further away from me. Since there's no interaction beyond 200px of the player.

And thanks for the link :) Will go through it in detail.

I guess I will do some practical tests too, to see what drains the battery the most, when it makes too much heat etc.
B
33
S
4
G
1
Posts: 272
Reputation: 2,500

Post » Sat Jan 30, 2016 11:29 pm

@damjancd have you added audio to your project yet? I haven't been able to get my audio background music / sound effect to play properly on my iPhone 6 iOS 9.2 during export testing through Intel XDK.
B
9
S
2
G
5
Posts: 54
Reputation: 3,546

Post » Sun Jan 31, 2016 1:56 am

Have you tried disabling groups of events? Within my game, there are quite a bit of collisions for one object onto another, and making a family isn't really an option since each enemy is worth a different amount regarding score.

So If I've got 15 Collisions for Sprite1 and 15 Collisions for Sprite 2.

Sprite1 Collision Events should ONLY be Active when Sprite1 is on screen and when Sprite1 is off-screen the group of collisions is Inactive. Same rules apply to Sprite2.
Risk Rocket now available on Google Play
Image
B
35
S
15
G
6
Posts: 337
Reputation: 6,275

Post » Sun Jan 31, 2016 2:31 am

@mars1985 I'm not using intel XDK, can it be more CPU efficient than CocoonJS with WebGL off? Because that's what I'm using, and it's not a barbecue like before I optimized but it still runs hot and drains battery with great dedication.

@Usman Haq In general I use the very minimum of groups. Only those necessary to be on at a time. So with 30 collisions per tick, does your game run hot on iPhones?

BTW I'm testing my hotness of iPhone in low battery mode on the iphone6. Maybe I should test it without that too.
B
33
S
4
G
1
Posts: 272
Reputation: 2,500

Post » Sun Jan 31, 2016 3:52 am

@chadorireborn Actually I had 30 collision checks per second, so 3 checks per tick. This is highly reasonable amount :) So I won't go for further optimizations in terms of collision. Will find the culprit in another area.
B
33
S
4
G
1
Posts: 272
Reputation: 2,500

Post » Sun Jan 31, 2016 9:47 am

damjancd wrote:@chadorireborn Actually I had 30 collision checks per second, so 3 checks per tick. This is highly reasonable amount :) So I won't go for further optimizations in terms of collision. Will find the culprit in another area.


If that is the case. Check in the debugger -->> Profiler Tab for any high usage of events. You must have an event that isn't optimized yet. But that is very unlikely.
So I think, this might be the cause of high GPU usage now. Try to see the Ram Usage during gameplay.
Image



The Things you can create is only limited by your imagination. If you don't have the skills then use your motivation as a natural force to exceed all expectations. Chadori RebornXD
B
51
S
17
G
90
Posts: 1,108
Reputation: 59,024

Post » Sun Jan 31, 2016 9:54 am

@chadorireborn I'm not certain what is considered low RAM usage, for now I have 27mb of RAM maximum used.
B
33
S
4
G
1
Posts: 272
Reputation: 2,500

Post » Sun Jan 31, 2016 3:52 pm

damjancd wrote:@chadorireborn I'm not certain what is considered low RAM usage, for now I have 27mb of RAM maximum used.


I see. Then based on the information you gave us, I think that your game is already well optimized. About your game heating on Iphone6. It really is just how HTML5 works. It uses a lot power and gives out more heat but it is a small price to pay to enable Gaming in HTML5. But it doesn't give out that much heat, if it does then it is the fault of the developer. But since your game performance usage is good then there is nothing to worry about.
Image



The Things you can create is only limited by your imagination. If you don't have the skills then use your motivation as a natural force to exceed all expectations. Chadori RebornXD
B
51
S
17
G
90
Posts: 1,108
Reputation: 59,024

Next

Return to How do I....?

Who is online

Users browsing this forum: RetroSpock, skrotar and 12 guests