My game lags in mobile devices.

Get help using Construct 2

Post » Sun Oct 05, 2014 3:40 pm

@jakobdam: Well.. Just a quick question. I think I got the problem. The problem is not performance of game, but the car behavior. The game is running at smooth framerate, but my car is just driving really slow like a turtle. What can be causing this ??
B
6
S
2
G
1
Posts: 77
Reputation: 708

Post » Sun Oct 05, 2014 7:59 pm

I'm guessing the lack of "Dt" or wrong use of "Dt". Do you use it?
B
12
S
2
Posts: 80
Reputation: 816

Post » Mon Oct 06, 2014 5:06 am

@jakobdam: ahem.. What is 'Dt' ??
B
6
S
2
G
1
Posts: 77
Reputation: 708

Post » Mon Oct 06, 2014 6:46 am

It's quite important to ensure that things behave at the same speed across devices. :)

https://www.scirra.com/tutorials/67/del ... dependence
B
12
S
2
Posts: 80
Reputation: 816

Post » Mon Oct 06, 2014 7:16 am

Message: Raganork can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
jakobdam wrote:It's quite important to ensure that things behave at the same speed across devices. :)

https://www.scirra.com/tutorials/67/del ... dependence


Ok I read it. I haven't used it in my game. I am using Car Physics behavior. How can I relate car acceleration with it ? There is no option.
B
6
S
2
G
1
Posts: 77
Reputation: 708

Post » Tue Oct 07, 2014 11:51 am

@Ashley: Can you help me in this ? I want to add dt in the car physics acceleration. Without this, my car is running fast in computer and slow in mobile. But there is no option in Car Acceleration action to multiply it with dt.
Or is there any way round that the car speed will be fps independent.
B
6
S
2
G
1
Posts: 77
Reputation: 708

Post » Tue Oct 07, 2014 12:00 pm

See Delta-time and framerate independence. All the built-in behaviors already use dt, you don't need to use it with them.
Scirra Founder
B
399
S
236
G
89
Posts: 24,525
Reputation: 195,382

Post » Tue Oct 07, 2014 12:04 pm

Message: Raganork can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
Ashley wrote:See https://www.scirra.com/tutorials/67/delta-time-and-framerate-independence Delta-time and framerate independence. All the built-in behaviors already use dt, you don't need to use it with them.


Yes but there is a line stating that Physics is an exception and it does not use dt. Is this applied to CarPhysics too ??
B
6
S
2
G
1
Posts: 77
Reputation: 708

Post » Wed Oct 08, 2014 5:41 pm

Ashley wrote: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.


hi ahsley,
is it mean that for mobile, and for better performance, its better to use asm.js ?
B
46
S
16
G
8
Posts: 794
Reputation: 8,335

Previous

Return to How do I....?

Who is online

Users browsing this forum: R0J0hound and 23 guests