Very slow performance on Mobile

Discussion and feedback on Construct 2

Post » Sun Sep 25, 2016 8:15 am

Hello All,
about a year ago I was wondering wether or not to buy the full Construct 2 license and after I rad forums about the slow performance of construct 2 on mobile devices I decided to wait a bit.
Now I bought the full version made a simple small game (not heavy at all) and its extremely slow on some devices.
Is there a fix to this problem?
Maybe the problem is elsewhere... I used few particles (3) could it be that fatal?
What will happen if Ill make a much bigger game?

Let me know your thoughts and experience about this.

Thanks
B
6
S
1
Posts: 56
Reputation: 548

Post » Sun Sep 25, 2016 9:25 am

What kind of device is it?

The most common mobile performance problem is that the graphics driver is buggy on Android devices so the browser disables the GPU. You can check for this in chrome://gpu in the Chrome browser.

Other than that you'd have to share your .capx so we can take a look.
Scirra Founder
B
402
S
238
G
89
Posts: 24,637
Reputation: 196,071

Post » Sun Sep 25, 2016 9:57 am

I can assure you that most Android Kitkat (4.4) devices up to Android Marshmallow (6.1) runs good with C2 made games as long as it follows these conditions....

+Less than 80mB active memory usage.
+Less than
(For small objects)200 simultameous moving objects.
(For average sized objects) 80
(For big sized objects) 30 or less.
+No physics! Unless the game project is small.
+Don't add unnecessary behaviors.
+Use Tilemaps instead of adjacent tiles.
+Use TiledBackground for Backgrounds.
+Turn off Collision for non-colliding objects.
+Assure events are optimized especially for loops.
+As much as possible, only use (2x2) image sized tiledbackground for ground floor or corner solid instead of solid tilemap / sprite .

If you follow these you'll get this performance within these range.

Small games : (52 to 60 fps)
Average games : (42 to 52 fps)
Big Games : ( 24 to 42 fps)

That's based on my experience on mobile development.
Last edited by chadorireborn on Sun Sep 25, 2016 2:09 pm, edited 1 time in total.
The Things you can create is only limited by your imagination. If you don't have the skills then use your motivation as a natural force to exceed all expectations. Chadori RebornXD
B
67
S
22
G
90
Posts: 1,125
Reputation: 60,036

Post » Sun Sep 25, 2016 10:04 am

I would add:

If you have multiple objects with the same sine and all objects perform the same movement, then turn off the sine in all objects and leave only one with sine activated, then make the other objects based on the object's movement has activated sine, so only one will be processing a sine movement.

Avoid multiplications events, for example:
Player.x <8 * 16

This is better:
Player.x <128

In my case it made me gain some FPS.
Sorry for my English, I hope you understand.
B
31
S
13
G
21
Posts: 844
Reputation: 14,693

Post » Sun Sep 25, 2016 10:07 am

80mB of memory usage? memory usage shouldn't be a problem

also how do you intend to make a big game with 80 mb of usage?
some games need up to 400-500MB per layout to work..
i don't think it's a memory problem it's more of a game design problem and people wanting to do more then can be done.
Sea Monsters template - Isometric
Also includes 40 pages PDF of optimizations and "how-to" for your games, and how the "sea monsters" template was built. Follow link for details :)

sea-monsters-templates-and-assets_t162705
B
43
S
14
G
12
Posts: 626
Reputation: 9,455

Post » Sun Sep 25, 2016 10:23 am

yurinkab wrote:Hello All,
about a year ago I was wondering wether or not to buy the full Construct 2 license and after I rad forums about the slow performance of construct 2 on mobile devices I decided to wait a bit.
Now I bought the full version made a simple small game (not heavy at all) and its extremely slow on some devices.
Is there a fix to this problem?
Maybe the problem is elsewhere... I used few particles (3) could it be that fatal?
What will happen if Ill make a much bigger game?

Let me know your thoughts and experience about this.

Thanks


I invite you to view my tutorial here mobile-optimization-tutorial-version2_t181811
And if you have any questions please ask them. But can you be more specific about the issue like

1) What type of game is it?

2) How many objects moving onscreen?

3) Did you have scrolling background?

4) Are your graphics jpg or png?

Then we can help you on your quest to make better running games. Also I did make a space shooter with 25+ enemies moving onscreen with no lag for android . You can try it here https://play.google.com/store/apps/deta ... t.ad&hl=en as proof that I do know how to optimize pretty well!!
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,635

Post » Sun Sep 25, 2016 10:38 am

Hi, Thanks for all the replies! :)
The problem indeed happens only with android devices I checked with 2: Samsung Galaxy s5 and a dell note.
on Iphone everything looks good.

The game is in its early stage so thats why I'm afraid about issues like this happening already now.

you can take a look at the game here:
http://yurinkastudio.com/games/ice/index.html

The problem begins when the user touches the main character to move it (everything becomes slow).

I would be happy to hear what you have to say.

Thanks!
Last edited by yurinkab on Sun Sep 25, 2016 10:48 am, edited 1 time in total.
B
6
S
1
Posts: 56
Reputation: 548

Post » Sun Sep 25, 2016 10:43 am

@yurinkab
Can you add a highscore to make it super fun. Its fun but a highscore would make it more fun. I made a tutorial that should make it easy to implement it in your game.


Highscore Tutorial
https://www.scirra.com/tutorials/5343/h ... -game-capx

Mobile Optimizing
mobile-optimization-tutorial-version2_t181811
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,635

Post » Sun Sep 25, 2016 10:46 am

That was exactly my next move @PixelPower! :)
Thanks for the tutorial, definitely will come handy!
There is a lot more to add... if you have other suggestions I will be happy to hear! :)

Thanks
B
6
S
1
Posts: 56
Reputation: 548

Post » Sun Sep 25, 2016 10:48 am

also @PixelPower do you know if the LocalStorage works like the Local storage in Javascript?
B
6
S
1
Posts: 56
Reputation: 548

Next

Return to Construct 2 General

Who is online

Users browsing this forum: rayray and 6 guests