Mobile games performance, let's be honest

Discussion and feedback on Construct 2

Post » Thu Feb 20, 2014 6:09 pm

@Beaverlicious I find your reply a bit patronizing to be honest, I am not speaking of Me Myself and I, I am speaking in general, should C2 not be the same speed in a straight line for everybody? I see no mention of sheet roots in the manual...
B
42
S
15
G
11
Posts: 655
Reputation: 12,270

Post » Thu Feb 20, 2014 6:31 pm

Well, I'm also not representing the whole humanity, but I see it like an art. Just because you give to people a brush and Tell them how to use it, doesn't make a great artwork. It's about how much effort you put in Details techniques and stuff..... And talent of course:-D
B
44
S
11
G
11
Posts: 1,154
Reputation: 9,988

Post » Thu Feb 20, 2014 7:57 pm

On iOS, cocoonjs' JavaScript performance, last I checked, was less than safari's. I hope they can improve it, but apple doesn't allow as many technologies on iOS (which is why chrome and Firefox aren't really on iOS - Firefox is a no show and chrome is just a reskin of the web view).

C2 may make game dev easier, but it is inherently a complex subject, and learning how to optimize for mobile is something you shouldn't expect to not have to learn. C2 cannot know when you're trying to do something in code that a target device can't handle. Are you targeting powerful or low-end devices? Or both? There's no way for C2 to know.
Moderator
B
95
S
34
G
33
Posts: 3,007
Reputation: 27,876

Post » Fri Feb 21, 2014 2:01 pm

B
111
S
28
G
48
Posts: 1,882
Reputation: 36,428

Post » Fri Feb 21, 2014 2:09 pm

@jayderyu can you give me link to your post?
B
111
S
28
G
48
Posts: 1,882
Reputation: 36,428

Post » Sat Feb 22, 2014 2:24 am

1. Do not ever use WebGL shader effects in Construct 2 for mobile games, it will cripple performance, I get the impression it is not hardware accelerated by the compilers.

2. Use minimal Physics Behaviour.

3. Don't use the PIN behaviour it cripples performance on mobiles. Also do not use rotate or angle every tick.

There's a few others, but most functions in C2 are really efficient and fine on mobiles, but a few are to be avoided.

I am not sure how complex your game is, can you do a youtube video/demo?
B
70
S
24
G
19
Posts: 1,757
Reputation: 17,616

Post » Sat Feb 22, 2014 3:08 am

delgado wrote:@ByR please take this APK: https://dl.dropboxusercontent.com/u/447 ... signed.apk


I have just tested this APK on my Tegra 3 tablet, its stuck at the blinking ludei logo.

I see they have still not fixed this simple bug after over a year. And the App doesn't load btw.

@delgado
I cannot test your game so I cannot see how complex it is, but my own game, 440MB ram required with CocoonJS, >3,600 events in Construct 2: http://www.youtube.com/watch?v=N4krwUmmb3c

Runs absolutely perfect even on older dual core phones. Intel XDK/Crosswalk is smoother than CocoonJS for my example, because I originally went with CocoonJS for this big game so I can compare both. Crosswalk reduced the ram requirements down to 250MB, as well as taking about 10 seconds to load with a progress bar near the finish instead of 40s with a blinking ludei logo.
B
70
S
24
G
19
Posts: 1,757
Reputation: 17,616

Post » Sat Feb 22, 2014 7:03 am

@Silverforce
I know your getting that reference from my post, but I think I need to clarify that. What I said was

adding any non needed behaviours will slow down your performance. As an example even PIN when NOT PINNED to anything will still takes it's toll on performance. In my test on an iPod Touch 4g; I could have 500+ objects render on the screen(no behaviours or code) and maintain 30fps, however when adding PIN even when not PINNED reduced the count to 70(with only PIN).

I did not say PIN was slow, what I meant to say was that ALL behaviours have a cost. So make sure the minimum number of objects use any behaviours at all that you can get away with.

@delgado
You already posted in the thread. Just becareful. Get the lowest end device that you want to run on. Then make that your only test device for performance checking. Don't even really use a PC unless you need PC compatibility.

If you need to use angle() and or any trig functions. Try to do it as little as possible. calculating angle() and lerp(), unlerp() often will slow everything down.
B
90
S
18
G
9
Posts: 2,455
Reputation: 15,038

Post » Sat Feb 22, 2014 8:16 am

@Silverforce Yeah i export with cocoon apk few times and check, game stuck on ludei logo. What is better to use than 'every tick'?

canvas 2d/webgl or WebView is better when i choose in cocoonjs compiler?

This is working apk: https://dl.dropboxusercontent.com/u/447 ... signed.apk

i dont use physics pin and webgl effects.
B
111
S
28
G
48
Posts: 1,882
Reputation: 36,428

Post » Sat Feb 22, 2014 9:39 am

@jayderyu
If what you say is indeed true, then certainly PIN behaviour is a big bottleneck in performance. I do not see that kind of performance drop using other behaviours, for sure not sine, bullet, fade, spin etc, especially if they are disabled.

@delgado
I just tested your game, there is definitely something wrong with your code or implementation within C2, because it is too simplistic for it to be running at 12 FPS on my quad core Tegra 3 tablet. When you run it via C2/Chrome, run in debug mode and look at the CPU usage, see where the bottleneck is highest at. There must be an event group in your code that's causing it, maybe a repeat/if/else trigger chain thats firing the entire group every tick by accident.
B
70
S
24
G
19
Posts: 1,757
Reputation: 17,616

PreviousNext

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 9 guests