My game lags in mobile devices.

Get help using Construct 2

Post » Fri Oct 03, 2014 6:07 pm

@jakobdam: Thanx for this detailed analysis. Took hell of a time to understand every point.
Well, i will start from point to point.

-I am using sprite font, but they are not used too much (as you can see in screenshot), only once, that too, is not moving
- Here explain me one thing, if I switch layouts, will the sprites from previous layout is destroyed automatically ??or do I need to destroy it at start layout event ?
- As you have guessed, all bg and objects are static, only car is moving. (in some cases AI cars moving), so nothing problematic here.
- I will check it and tell. Also I am trying some more things. if it still not work, i will try to produce a playable link for you to check. I dont want to go back on this game now as it is almost complete
B
6
S
2
G
1
Posts: 77
Reputation: 708

Post » Fri Oct 03, 2014 8:43 pm

you can replace rotate by rotate animation
B
46
S
16
G
8
Posts: 794
Reputation: 8,335

Post » Sat Oct 04, 2014 5:44 am

matrixreal wrote:you can replace rotate by rotate animation


In my game, there is no rotating objects. In fact Only player car is moving, by car physics behavior. Every other objests are static
B
6
S
2
G
1
Posts: 77
Reputation: 708

Post » Sat Oct 04, 2014 6:42 am

Message: Raganork can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
@jakobdam: I have uploaded my project on a server. Here's the link

http://goo.gl/lomzR5
B
6
S
2
G
1
Posts: 77
Reputation: 708

Post » Sat Oct 04, 2014 12:01 pm

Tested on iPhone 5, iPad 4 and Windows PC in Chrome and Firefox; no problems - no lag at all.

My PC's GPU is at ~65%, which isn't anywhere near tuff. My CPU is at ~15% - likewise, this isn't bad at all...

Maybe you test platform is the issue? How much free RAM do you have? Fx. try and install MemoryInfo or a similar app that can cleanse your RAM (so you don't have to reboot the device).

Also; are you using Safari or another browser, for testing?
B
12
S
2
Posts: 80
Reputation: 816

Post » Sat Oct 04, 2014 1:25 pm

From Performance tips under "common causes of poor performance":

Too many objects using Physics
The Physics behavior is very CPU intensive. Using too many objects with the Physics behavior can cause considerable slowdown. You should design your games to use a few large Physics objects rather than many small Physics objects.


Designing a mobile game to make heavy use of the Physics behavior is probably the least efficient first decision you could make. You might be able to get some more performance choosing asm.js physics mode in project properties, but the physics behavior is just about the most CPU-intensive behavior there is, and if you insist on sticking to it and have to use lots of objects then you are probably never going to get good performance.
Scirra Founder
B
399
S
236
G
89
Posts: 24,519
Reputation: 195,361

Post » Sat Oct 04, 2014 1:55 pm

@jakobdam: What seriously ?? then why it lags in my iPad 4 ?? Can you please do me a favor. Can you please check it on mobile device, like any normal android device ? If it still don't lag, I will throw away all my devices and will take retirement and go to Himalayas. (just kidding :P )

@Ashley: If you have seen my game, there are many objects (almost all are static). I was just thinking, do I need to add physics behavior to all objects ? By only adding collider and checking collision with car object (in my game), will this increase performance ?
B
6
S
2
G
1
Posts: 77
Reputation: 708

Post » Sat Oct 04, 2014 2:22 pm

Yeah, performance is not poor with my devices - as stated, I also tested on my iPhone... I don't have anything weaker than that right now - in a few days, I'll have access to my entire test repertoire again, but I don't think it'll matter much.

It sounds like what you're experiencing is an issue that is common for all devices when they're low on memory; so do check your available memory on the devices that stutter.

What you can also do, is make a "save as"-version of your game, and create a simple steering, which doesn't involve physics; then you can pin point if physics are creating the issue for you here.
B
12
S
2
Posts: 80
Reputation: 816

Post » Sat Oct 04, 2014 2:35 pm

Tested on Moto X and I did not have problems here.
B
5
S
1
Posts: 4
Reputation: 373

Post » Sat Oct 04, 2014 2:56 pm

@trovao1990: Thanks.. Now its my time to pack bags to Himalayas.. :P On serious note, I think I should take another look on my gadgets..
B
6
S
2
G
1
Posts: 77
Reputation: 708

PreviousNext

Return to How do I....?

Who is online

Users browsing this forum: zenox98 and 6 guests