How do I fix my performance issues when using built apk file

Get help using Construct 2

Post » Fri Jan 02, 2015 10:05 am

Hi,

I have written a top down platform shoot-em up game which I thought was working really well.

The window size was reduce from 1280 x 720 to 640x360 to see if this helps
The layout size is now 1024 x 6144 with a tile background and not individually placed sprites.
All loadable objects are destroyed on layout.
I have about 360 objects in the layout.
I have around 0-130 particles going off from time to time, but only on certain events like a tank exploding.
Image memory use is about 13.5mb

So on my windows machine I get 60FPS (steady, with no drop) which I would expect based on my GPU.
When I run the game using the LAN via the construct 2 web service on my mobile device I get around 30 to 35 FPS (steady) which is great and would be happy with even 25FPS.
but once I export this using Cordova, then build the apk using the Intel XDK tool, then install on my device I am only getting between 5 and 10 FPS.

If I cut any more out of the game (such as objects) I might as well have stick figures running around the page.

I am testing this on a samsung Galaxy TAB 3 device which is not the greatest but I think a good device to base a minimal test on for the game, but not sure why it so slow. I have also tested this on a HTC M8 which is not bad and gets around 15-18 FPS, but still not great.

I am not pushing the game to any real limits that I believe should be restricting this, so I am now at a loss to see why this is running so badly.

I have read the performance improvement pages and have initiated all of them with no gain at all.

Does anyone have any ideas as what to look for or why this is about 10% of the speed after testing on my pc and 60% slower after the web connection test?

Thank you,

Paul
B
6
S
1
Posts: 38
Reputation: 417

Post » Sat Jan 03, 2015 12:11 am

Update

okay. After stripping my game down to basically 1 layout, 1 layer and hardly any game code I was still getting about 5 to 10 FPS. So after many many hours of rebuilds and tests I was getting nowhere fast, so I thought this just can't be right.

So, I have decided to build using cordova/XDK-Android/Crosswalk (arm-apk) (which adds about 20mb to the file size), however I am now getting 40+ FPS on a TAB3 and 60 FPS (steady) on the HTC M8 for the same game.

This is a massive difference, so if you are having performance issues, don't use the Android build in the XDK, use the Crosswalk build as it worked for me. I now know that this was probably the best way to have done it in the first place, but did not think that it would make this difference.

I will start adding all of the niceties I took out of the game again to see what happens, but it looks VERY promising. Oh I feel better..... :D
B
6
S
1
Posts: 38
Reputation: 417

Post » Sat Jan 03, 2015 1:43 am

Android Crosswalk is definitely the recommended way. At least you got it sorted :)

For best results publish with Crosswalk, which is like Google Chrome for Android turned in to a wrapper for native apps. For more information see How to export to Android with Crosswalk.

https://www.scirra.com/tutorials/367/how-to-make-android-games

https://www.scirra.com/tutorials/809/how-to-export-to-android-with-crosswalk
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596


Return to How do I....?

Who is online

Users browsing this forum: varr and 4 guests