How do I create a performance counter

Get help using Construct 2

Post » Tue Mar 04, 2014 12:14 am

I am using CocoonJS for iOS and Android. I tried using Crosswalk and found the performance to be un-usable. On an iPhone 4s, I get great solid 30 FPS performance. On the Samsung Galaxy S III. I get ~28 FPS, but huge drops when I take actions in my game. Down to 5-7 FPS.

I want to add performance counters into my project so I can see exactly what method/function/timer is doing this.

I am not using physics, there are no more than 100 sprites on the screen and I am not using many if any effects/particles.

On the PC it is always 60 FPS. The issue is mainly older android. But this is also a platform I can't avoid.

Any tips for tracking down very specific perf issues?
B
30
S
10
G
7
Posts: 416
Reputation: 7,239

Post » Tue Mar 04, 2014 12:33 am

I suggest you do a preview over wifi of your game if possible (cocoonJS can do that, I don't remember the procedure correctly though), with the debuger enabled (the url should be something like http://XX.XX.XX.XX:50000/debug )

The debuger could help you to see what is the problem
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
52
S
22
G
18
Posts: 2,122
Reputation: 17,093

Post » Tue Mar 04, 2014 12:59 am

Aphrodite wrote:I suggest you do a preview over wifi of your game if possible (cocoonJS can do that, I don't remember the procedure correctly though), with the debuger enabled (the url should be something like http://XX.XX.XX.XX:50000/debug )

The debuger could help you to see what is the problem


So the default cocoonjs debugger tells me a couple things, warnings, actions, errors. There is a profiler inside CocoonJS Launcher, but it only knows how to deal with native commands. So if you open up the logs from the launcher, it will be nothing but more low level api calls. See here: http://support.ludei.com/hc/en-us/articles/200767218-Profiling.

If you look at this image here
Image
You will see the slices are great for telling me where the slow draws are, but they have no meaning to me in Construct 2.

In C2 I know "Fighting Methods", "Touch Methods for Puzzle".

I'm looking to get to that level.

Secondly, I am testing on slower phones, so my PC shows GPU/CPU always at like 0.1 - 4% max. That never translates to the phone equally.
B
30
S
10
G
7
Posts: 416
Reputation: 7,239

Post » Tue Mar 04, 2014 1:03 am

firebelly wrote:
Aphrodite wrote:I suggest you do a preview over wifi of your game if possible (cocoonJS can do that, I don't remember the procedure correctly though), with the debuger enabled (the url should be something like http://XX.XX.XX.XX:50000/debug )

The debuger could help you to see what is the problem


So the default cocoonjs debugger tells me a couple things, warnings, actions, errors. There is a profiler inside CocoonJS Launcher, but it only knows how to deal with native commands. So if you open up the logs from the launcher, it will be nothing but more low level api calls. See here: http://support.ludei.com/hc/en-us/articles/200767218-Profiling.

If you look at this image here
Image
You will see the slices are great for telling me where the slow draws are, but they have no meaning to me in Construct 2.

In C2 I know "Fighting Methods", "Touch Methods for Puzzle".

I'm looking to get to that level.

Secondly, I am testing on slower phones, so my PC shows GPU/CPU always at like 0.1 - 4% max. That never translates to the phone equally.


I was more thinking about https://www.scirra.com/tutorials/247/how-to-preview-on-a-local-network/page-1 if it is possible
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
52
S
22
G
18
Posts: 2,122
Reputation: 17,093

Post » Tue Mar 04, 2014 1:49 am

Aphrodite wrote:I was more thinking about https://www.scirra.com/tutorials/247/how-to-preview-on-a-local-network/page-1 if it is possible


Yes, this is what I use for testing.

I export to a local folder (using cocoon export) and share with mongoose web server, then just reload the zip each time. This gives me as close to a real release as possible with least effort, plus C2 can be open or closed.
B
30
S
10
G
7
Posts: 416
Reputation: 7,239


Return to How do I....?

Who is online

Users browsing this forum: Sparkz, Yahoo [Bot] and 2 guests