How do I increase FPS / Increase Performance

Get help using Construct 2

Post » Mon May 12, 2014 8:01 pm

One last suggestion I can make regarding physics:

change the Precision of the physic simulation using the action "Set stepping iterations" for one of the object (will apply to every object using the physics behavior), a lower value is faster

Also if slowing down is the issue, maybe you can also change the stepping mode with the "Set stepping mode" action, which will also apply to all of them.

https://www.scirra.com/manual/98/physics
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 » Tue May 13, 2014 8:00 pm

its pretty obviuos that your project or your pc is not running webgl, but canvas2d... that why you get bad pefromance.
B
23
S
6
G
3
Posts: 316
Reputation: 3,461

Post » Tue May 13, 2014 8:22 pm

henriquesv wrote:Hi, I also tried CocoonJS... it is not worthy! Compilation takes a lot of time and it can be even slower.. =(

Seems like I have to quit using embedded physics and aim some work-around....


Physics is always an issue with JavaScript. But I am getting smooth 60fps on my old desktop. :D
B
40
S
11
G
4
Posts: 665
Reputation: 8,453

Post » Tue May 13, 2014 8:24 pm

Lunatrap wrote:its pretty obviuos that your project or your pc is not running webgl, but canvas2d... that why you get bad pefromance.


Are you sure about that? As far as I know physics have nothing to do with WebGL. This all runs in JavaScript. Not on the GPU. His graphics hardly matter for such a simple demo.
B
40
S
11
G
4
Posts: 665
Reputation: 8,453

Post » Wed May 14, 2014 11:06 am

Aphrodite wrote:One last suggestion I can make regarding physics:

change the Precision of the physic simulation using the action "Set stepping iterations" for one of the object (will apply to every object using the physics behavior), a lower value is faster

Also if slowing down is the issue, maybe you can also change the stepping mode with the "Set stepping mode" action, which will also apply to all of them.

https://www.scirra.com/manual/98/physics


@Aphrodite, thanks for your suggetions. Looks like it got better.... but not smooth yet on Android. I think that I will have to publish it only for the new devices. =/
B
24
S
4
G
1
Posts: 177
Reputation: 1,827

Post » Wed May 14, 2014 11:07 am

Schoening wrote:
Lunatrap wrote:its pretty obviuos that your project or your pc is not running webgl, but canvas2d... that why you get bad pefromance.


Are you sure about that? As far as I know physics have nothing to do with WebGL. This all runs in JavaScript. Not on the GPU. His graphics hardly matter for such a simple demo.


That's what I thought.
B
24
S
4
G
1
Posts: 177
Reputation: 1,827

Post » Wed May 14, 2014 11:08 am

Schoening wrote:
henriquesv wrote:Hi, I also tried CocoonJS... it is not worthy! Compilation takes a lot of time and it can be even slower.. =(

Seems like I have to quit using embedded physics and aim some work-around....


Physics is always an issue with JavaScript. But I am getting smooth 60fps on my old desktop. :D


@Schoening, could you please tell me your old desktop's specs and what web browser are you using?
Thanks!
B
24
S
4
G
1
Posts: 177
Reputation: 1,827

Post » Wed May 14, 2014 11:16 am

@henriquesv

Image

I'm surprised you get any issues.. My guess is that you have to many events. Consider using a Family Object for the events and then nest from there.

Instead of:

Code: Select all
On Blue Touched
On Red Touched
On Green Touched


Do:

Code: Select all
On Square Touched -> If [square color] -> Do this.


That should reduce the amount of events.
(I have not yet looked through the Construct2 source code. But I would assume that this reduces some internal looping quite a bit)
B
40
S
11
G
4
Posts: 665
Reputation: 8,453

Post » Wed May 14, 2014 11:45 am

- You might reduce collision points in blocks, for example the red, yellow, green, blue block from 11 points to 4.
- As discussed @henriquesv can maximize event scheduling.
B
157
S
27
G
17
Posts: 912
Reputation: 32,602

Post » Thu May 15, 2014 1:03 am

Thanks Guys! I will give it a try tomorrow! I will let you know.
@Schoening, this is your old desktop? I was working with this old desktop:
Intel Pentium Dual E2140 @1.60Ghz - 3,00GB / Win7 64bit
=)
B
24
S
4
G
1
Posts: 177
Reputation: 1,827

PreviousNext

Return to How do I....?

Who is online

Users browsing this forum: brunopalermo, ST314, tarek2 and 32 guests