Mobile games performance, let's be honest

Discussion and feedback on Construct 2

Post » Mon Feb 24, 2014 9:17 pm

@delgado - how does the Profile view look in the debugger? The areas of code with the biggest demands on your cpu will be shown in the profile and will indicate where you're best trying to streamline your code. If you are using any webgl shader effects in cocoonjs then they will kill your performance as well (I set my project up to use them on a sprite font... a simple color shader reduced performance by 30 fps :cry:).
B
76
S
20
G
76
Posts: 2,287
Reputation: 47,558

Post » Mon Feb 24, 2014 9:20 pm

@Colludium "The areas of code with the biggest demands on your cpu will be shown in the profile"

You mean?: Image


i dont use text obiect in layout of game and i do not use shaders
B
113
S
29
G
48
Posts: 1,883
Reputation: 36,580

Post » Mon Feb 24, 2014 9:41 pm

@delgado, if this is my game, i might do the followings to check:
1. Kill half outside enemy/items object and see if the problem gets fixed.
2. If yes, that means C2 is busy dealing with them.
3. Try to use spawn spot to create enemy instance when player approaching spawn spot.
B
78
S
18
G
4
Posts: 197
Reputation: 7,838

Post » Mon Feb 24, 2014 9:49 pm

@delgado - that's the one!

To me it seems that there's quite a lot of CPU effort going into running the Engine event sheet, but it's impossible to identify the culprit without breaking that sheet's events down further. So as to isolate which areas of your code are causing the CPU the most work, you'll need to add Groups to each chunk of code in that sheet. The profile will then show the percentage CPU being used for each Group so you can then see with more detail what's causing the CPU so much work.

If some of your layout animation / controls are for off screen objects then the next step could be to disable those Groups until the player is nearby and they are needed. It might be that there's a lot of control work going on that doesn't need to be done all the time - you might even find that there's a bug or two in your code that way (that's usually what happens to me!).
B
76
S
20
G
76
Posts: 2,287
Reputation: 47,558

Post » Mon Feb 24, 2014 9:58 pm

@jomo can you explain me why i have low performance in menu layout? (on my sony xperia S)
new update on android: https://dl.dropboxusercontent.com/u/447 ... signed.apk
B
113
S
29
G
48
Posts: 1,883
Reputation: 36,580

Post » Mon Feb 24, 2014 10:13 pm

@delgado your menu works smooth and fine on my phone. But I noticed 2 things
1. It seems that you used a filter effect to let ur airplane tunneling through the title. If you use any layer with force own texture on, try to turn ut off.
2. C2 loads the game layout by layout. Since u have a ultra long layout, it takes very longttime to load after press game start.
B
78
S
18
G
4
Posts: 197
Reputation: 7,838

Post » Mon Feb 24, 2014 10:43 pm

In the behaviour tab on the left, have collisions disabled by default, so you don't need a trigger X is NOT on-screen -> set col disabled.

Also this is going to need input from Ashley, perhaps send him your capx project for them to take a look. It will be interest to know for the rest of us, whether all the objects off-screen on a larger layout for scrollers consume that much CPU cycle is normal.
B
70
S
24
G
19
Posts: 1,757
Reputation: 17,616

Post » Mon Feb 24, 2014 11:13 pm

@Ashley if you would like to have a look at this issue?
B
113
S
29
G
48
Posts: 1,883
Reputation: 36,580

Post » Mon Feb 24, 2014 11:18 pm

I can't help without a .capx.
Scirra Founder
B
403
S
238
G
89
Posts: 24,654
Reputation: 196,145

Post » Mon Feb 24, 2014 11:32 pm

@Ashley i send you email
B
113
S
29
G
48
Posts: 1,883
Reputation: 36,580

PreviousNext

Return to Construct 2 General

Who is online

Users browsing this forum: tarek2 and 6 guests