Game on Android device extremely slow

Get help using Construct 2

Post » Fri May 13, 2016 11:30 pm

I have a basic platform game in development and when I install it on my Android phone, the in game is very slow. Like super slow for player movement and touch key simulations for the arrow keys.

The game works fine when testing in a browser.

I am using Cordova export and then compiling/packaging it to an APK file using Cordova CLI.

Any ideas where I should start looking? I am lost at where to even look.

Sample of my game code in the event sheet.
Image
B
8
S
2
Posts: 14
Reputation: 506

Post » Sat May 14, 2016 12:41 pm

Ok I can definitely help you but 1st I need to know the strenght of your phone. Download this game
https://play.google.com/store/apps/deta ... ead.nights if it runs fast on your device then it your game I can help you make your game faster. If my game runs slow on your device then its your device thats slow. Test my game on your device and post results then I can help you.
Check out my awesome Android Game releases https://play.google.com/store/apps/deve ... ames&hl=en
B
38
S
18
G
24
Posts: 682
Reputation: 16,615

Post » Sat May 14, 2016 1:41 pm

PixelPower wrote:Ok I can definitely help you but 1st I need to know the strenght of your phone. Download this game
https://play.google.com/store/apps/deta ... ead.nights if it runs fast on your device then it your game I can help you make your game faster. If my game runs slow on your device then its your device thats slow. Test my game on your device and post results then I can help you.



I have a Samsung S4, and also an Alcetal Pop 3. Both are decent phones.

I found that when I compiled using Intel IDK, the app performed great.

however, I hate using their servers because my apps end up being 10 times larger in size, and also I have never been able to get IAP working.

I tried your game and it works great as well.
B
8
S
2
Posts: 14
Reputation: 506

Post » Sat May 14, 2016 7:00 pm

Best advice I can give is lower your resolution to 650,350 also use inner scale instead of letterbox scale . Also resize your sprites to fit in that resolution. Do not resize them in Construct editor because file size will be the same. Resize your graphics using gimp or paint.net tool. Smaller image size files greatly reduce memory consumption. After that your game should run very smooth.
If not then Iam going to have to see screenshots of your event sheet.
Check out my awesome Android Game releases https://play.google.com/store/apps/deve ... ames&hl=en
B
38
S
18
G
24
Posts: 682
Reputation: 16,615

Post » Sun May 15, 2016 1:45 pm

Thanks Pixel
I was able to resolve my issue and here is what I did, in case anyone has the same issue.

I want to use Cordova CLI for compiling and packaging my apps, mainly because I do not have the internet bandwidth to wait for my code to upload, then build, then download. Truly a waste to me. On Cordova CLI, I can build my app in less than 30 seconds, and then install it locally for proper testing.

Anyways, I found I needed to install CrossWalk to get the same performance as Intel IDX does.

To install CrossWalk in Cordova CLI you will get errors building if you do not add these two Android SDK Libraries.
1. Open Android SDK.
2. Scroll down to Extras
3. Add Android Support Library
4. Add Google Repository

Next add CrossWalk to your project.
1. cordova plugin add cordova-plugin-crosswalk-webview
Or follow this link
https://crosswalk-project.org/documenta ... rdova.html

The next things I did, was follow PixelPower's advice. I made all images the correct size. This fixed all performance issues.
B
8
S
2
Posts: 14
Reputation: 506

Post » Sun May 15, 2016 2:36 pm

rkruis wrote:Thanks Pixel
I was able to resolve my issue and here is what I did, in case anyone has the same issue.

I want to use Cordova CLI for compiling and packaging my apps, mainly because I do not have the internet bandwidth to wait for my code to upload, then build, then download. Truly a waste to me. On Cordova CLI, I can build my app in less than 30 seconds, and then install it locally for proper testing.

Anyways, I found I needed to install CrossWalk to get the same performance as Intel IDX does.

To install CrossWalk in Cordova CLI you will get errors building if you do not add these two Android SDK Libraries.
1. Open Android SDK.
2. Scroll down to Extras
3. Add Android Support Library
4. Add Google Repository

Next add CrossWalk to your project.
1. cordova plugin add cordova-plugin-crosswalk-webview
Or follow this link
https://crosswalk-project.org/documenta ... rdova.html

The next things I did, was follow PixelPower's advice. I made all images the correct size. This fixed all performance issues.


I'am glad it worked out. Having you game on your device running smoothly is an awesome feeling of accomplishment no matter how many times I do it.
Check out my awesome Android Game releases https://play.google.com/store/apps/deve ... ames&hl=en
B
38
S
18
G
24
Posts: 682
Reputation: 16,615


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 16 guests