Performance in Android & CocoonJS

Get help using Construct 2

Post » Wed Oct 17, 2012 8:02 am


Hi everyone. Ive been using Construct for a few years now, but still I dont consider myself a Pro user, Im adapting to the "2" version the best I can, but my programming and scripting skills are close to 0.
Anyway, I manage to create a simple game and make it work on my Android cellphone using CocoonJS platform.

The thing is, that no matter how I try to make the graphics smaller and the code simpler, the final APK is a lot bigger than the normal apps of the kind. And the performance is really poor.

If anyone could give me some direction on how to improve performance I would really appreciate it.
B
11
S
1
G
2
Posts: 57
Reputation: 1,690

Post » Wed Oct 17, 2012 8:25 am

Have you read the performance tips ?

https://www.scirra.com/manual/134/performance-tips

Could you tell me what kind of game you make ?? I have a lot of experience in creat a platformer game for mobile using cocoonjs.farsmile902012-10-17 08:27:15
B
50
S
12
G
7
Posts: 259
Reputation: 10,371

Post » Wed Oct 17, 2012 4:02 pm

Hi! Thanks, yes Ive followed this tips like a checklist.

The game is a set of mini-games tied up on a unifying theme.
There is one "smasher", one like top down space shooter, and a puzzle.

Im not using physics, particles, or effects.
Not using layers blend modes, only 2 to 3 layers per layout and only 12 layouts.
The only behaviors I use are: Sine, bullet, fade, rotate, drag&drop.

B
11
S
1
G
2
Posts: 57
Reputation: 1,690

Post » Wed Oct 17, 2012 4:58 pm

Sine, and face maybe rotate behavior may cause the FPS down, as i can see here, the Sine behavior is the most cause down FPS. Check the " space blaster" in "example" folder, try to test it using cocoonjs, friend.
B
50
S
12
G
7
Posts: 259
Reputation: 10,371

Post » Wed Oct 17, 2012 7:23 pm

Well this could be one major thing. Most of my enemies have Sine behavior in different configurations and at some point they come in hordes so Im spawning like 15 to 20 objects with this behavior.

Ill try to reduce the usage of it and test again. Thanks for the advise.
B
11
S
1
G
2
Posts: 57
Reputation: 1,690

Post » Wed Oct 17, 2012 7:24 pm

Hi 3divison,

have you tested with a lot of devices? To become a good perfomance on android devices is very annoying! There are a lot of things to work with. In example Ive tested my game on two devices, seems to have nearly the same hardware reqierments. But only of one of the devices my game works very well.

B
4
Posts: 19
Reputation: 720

Post » Wed Oct 17, 2012 7:59 pm

No, for the moment Ive tried in three devices. One is old, first version of Android and it didnt even run.
Then I tested in Motorola Defy. Android 2.1 slow performance.
Samsung Galaxy Ace. Android 2.3 a little faster.

I know that these are already old devices, but my goal is to make it run in an acceptable framerate for these devices to make a wide compatible product.
Im thinking on buying a new Galaxy S3 to see how it goes in a new device.
Using CocoonJs cloud compilation system.
B
11
S
1
G
2
Posts: 57
Reputation: 1,690

Post » Thu Oct 18, 2012 3:44 pm

I discovered that the problem is on the load of the game. Its like is loading everything to memory or something. After 1min if you let the game charge, you will be able to play it with good performance and almost no problems.
Could this be related to sound & music?. Audio compression, format, quality etc. ?
B
11
S
1
G
2
Posts: 57
Reputation: 1,690

Post » Thu Oct 18, 2012 6:56 pm

As I understand it, apparently browsers start playing the games before they've finished optimizing the JavaScript (presumably to improve loading times) so performance can be spotty at first, then improve. That sounds a lot like what you're experiencing.
Moderator
B
88
S
32
G
33
Posts: 3,005
Reputation: 27,432

Post » Fri Oct 26, 2012 7:01 pm

I made a major optimization in sprites and sounds but it didnt improve anything.
Im counting 5 to 8 FPS on screen in the Android phone. And in PC its giving me 60.

Its a really simple game, pretty much like the space blaster on the C2 example.
...

Is it possible to share the Capx project privately with someone in scirra to give it a quick check?.

Thanks.

B
11
S
1
G
2
Posts: 57
Reputation: 1,690

Next

Return to How do I....?

Who is online

Users browsing this forum: makkancs and 27 guests