How do I stop my game lagging on mobile?

Get help using Construct 2

Post » Mon May 26, 2014 8:28 pm

I have just exported my game into Android in form of an APK file and installed it on my Nexus 4. Unfortunatly the game runs pretty bad with obvious stuttering (about 13-15 FPS) which for a side scrolling game is pretty poor and unable to release it. When I run it on my Desktop and over the web via "preview" to the device it works flawless.

I have read articles on how to get the most out of mobile hardware and really tried dumbing it all down (removing all particle effects, changing background from sprite -> tileset, shrinking my background. etc.) but it still doesn't work properly and performance is still poor.

The game from what I can see has 116 Events. No Loops and each level has no more than 6 layers.

I have really tried my hardest to understand the articles on how to dumb my game down to mobile devices but it's far too complicated, I have no talent in art or coding what so ever. If you have any tips on how I can solve the problem please write it in simple terms for me.

Thank you :)
B
7
S
1
Posts: 25
Reputation: 477

Post » Mon May 26, 2014 8:41 pm

We need to see your capx file before we can offer any help.
B
56
S
15
G
13
Posts: 826
Reputation: 17,645

Post » Mon May 26, 2014 8:46 pm

are you using webgl effects? do you have text objects around? are there objects using pathfinding behaviour? did you check in debugger how many collision checks are being öade per tick? how many objects are spawming? what is your layout size?

I know lots of questions but these are what caused my apps to run slow on mobile. also which mobile device are you checking it with?
B
18
S
4
G
1
Posts: 332
Reputation: 3,149

Post » Mon May 26, 2014 8:52 pm

Tekniko wrote:We need to see your capx file before we can offer any help.


How do I get that ?
B
7
S
1
Posts: 25
Reputation: 477

Post » Mon May 26, 2014 8:54 pm

Edited
Last edited by Tekniko on Mon May 26, 2014 8:55 pm, edited 1 time in total.
B
56
S
15
G
13
Posts: 826
Reputation: 17,645

Post » Mon May 26, 2014 8:55 pm

Windwalker wrote:are you using webgl effects? do you have text objects around? are there objects using pathfinding behaviour? did you check in debugger how many collision checks are being öade per tick? how many objects are spawming? what is your layout size?

I know lots of questions but these are what caused my apps to run slow on mobile. also which mobile device are you checking it with?


No WebGL effects.
All Text has been made into a sprite and even then it's only 3 sentences.
No Pathfinding.
3500 Collision Checks ? In debug mode I think
How do I find out how many objects I have ?
Layout Size is 5000, 500
B
7
S
1
Posts: 25
Reputation: 477

Post » Mon May 26, 2014 9:01 pm

In the debugger, there is a border belt seperating gameview and info tabs. The first thing in the far left of this belt is the object count.
3500 collision checks per tick or per second?
Which phone are you testing on?
Did you use crosswalk or cocoonjs to apk it?
Layut size is fine, everything else is fine. Are you using physics objects?
B
18
S
4
G
1
Posts: 332
Reputation: 3,149

Post » Mon May 26, 2014 9:16 pm

Windwalker wrote:In the debugger, there is a border belt seperating gameview and info tabs. The first thing in the far left of this belt is the object count.
3500 collision checks per tick or per second?
Which phone are you testing on?
Did you use crosswalk or cocoonjs to apk it?
Layut size is fine, everything else is fine. Are you using physics objects?


I used Intel XDK to APK it up.
Testing on a Nexus 4 (Pretty powerful hardware)
The Performance Tab says Collision Checks/sec: 4004 (~89/tick)
120 Objects apparently.
No Physics at all.
B
7
S
1
Posts: 25
Reputation: 477

Post » Mon May 26, 2014 9:46 pm

" When I run it on my Desktop and over the web via "preview" to the device it works flawless."

Do you mean that the preview on the device runs great? (if so, does the HTML5 exported runs great in the chrome browser of the device too? If so, then I'd say it is a problem not on your side IMO)
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
53
S
22
G
18
Posts: 2,122
Reputation: 17,123

Post » Mon May 26, 2014 9:59 pm

Aphrodite wrote:" When I run it on my Desktop and over the web via "preview" to the device it works flawless."

Do you mean that the preview on the device runs great? (if so, does the HTML5 exported runs great in the chrome browser of the device too? If so, then I'd say it is a problem not on your side IMO)


I exported it as a regular HTML 5 and just put the files on the device, It didn't run through chrome because "Exported games won't work until you upload them" JavaScript error happened. No idea what this means and no idea how to fix it.

But when I preview the game via my localhost in chrome on the mobile device it works fine (other than the Audio takes forever to catch up).
B
7
S
1
Posts: 25
Reputation: 477

Next

Return to How do I....?

Who is online

Users browsing this forum: dop2000, mcscooter, TL22 and 25 guests