How do I increase FPS / Increase Performance

Get help using Construct 2

Post » Sun May 11, 2014 8:22 pm

Hello guys!

I am working on a game that is actually pretty simple. The thing here is that it performance is really low! It is possible to play it on Desktop Computers somehow... but it gets ugly on Android or iOS.

Here is an image of its debug running. Any ideas on how I could improve its performance?

For this game I have a chronometer (showing minutes and seconds), 16 objects using collision detection, 4 unmovable objects as walls and 4 objects as detection areas / zones.

Also (maybe it is here) on every tick I count how many of those 16 objects are on each of the detection areas.

Any ideas? Thanks!
You do not have the required permissions to view the files attached to this post.
B
24
S
4
G
1
Posts: 177
Reputation: 1,827

Post » Sun May 11, 2014 8:33 pm

Tried changing your renderer to WedGL?
B
56
S
15
G
13
Posts: 826
Reputation: 17,645

Post » Sun May 11, 2014 8:42 pm

Hi @Tekniko! What do you mean? At project's properties? Its WebGL is On already...
Physics Engine is Bpx2D Web.

One thing that I did is to change most of its "detecting" actions from "Every Tick" to "Every 1.0 seconds". But didn't see much improvement.
B
24
S
4
G
1
Posts: 177
Reputation: 1,827

Post » Sun May 11, 2014 8:53 pm

Upload your capx.
B
56
S
15
G
13
Posts: 826
Reputation: 17,645

Post » Sun May 11, 2014 10:05 pm

There you go. Please take a look.

I've seen around here that collisions do take a lot of processing. But in this case I don't see any other way.
You do not have the required permissions to view the files attached to this post.
B
24
S
4
G
1
Posts: 177
Reputation: 1,827

Post » Sun May 11, 2014 11:24 pm

henriquesv wrote:There you go. Please take a look.

I've seen around here that collisions do take a lot of processing. But in this case I don't see any other way.


Unless I missed something, You have a lot of events (60 to 75, all the token collision group in fact) that checks for collisions for no apparent reason, which will of course be an issue for performances.The physic behaviors already do it's own collisions checks by itself without you needing to do anything, so doing other collision checks on top of that is not needed.

Also maybe switching to Box2d asm.js can help, but not 100% sure about that.
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 » Mon May 12, 2014 11:21 am

Hello @Aphrodite !
Yeah, from 60 to 75 it is supposed to play a sound of objects colliding with each other. I have removed the sound for this capx and forgot to remove the events. So I removed it from the capx attached now ... but it didn't really help.

And yes, switching to Box2d asm.js helped with +- 10 frames =) ... I will try to use it with mobile devices as well.. I will post it here later.

Tks
You do not have the required permissions to view the files attached to this post.
B
24
S
4
G
1
Posts: 177
Reputation: 1,827

Post » Mon May 12, 2014 11:31 am

Also, did you try exporting the project to test it on mobile?
I know the debugger adds an overhead to performances, and previewing isn't as good as exported version.
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 » Mon May 12, 2014 12:47 pm

I have just tried exporting to Android and using XDK (Crosswalk). It got worst =(
It is an Android 4.0 Tablet - 1GHz Processor / 512MB RAM

I also tried on iPAD Mini (1st version). It isn't smooth yet... =(
B
24
S
4
G
1
Posts: 177
Reputation: 1,827

Post » Mon May 12, 2014 7:21 pm

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....
B
24
S
4
G
1
Posts: 177
Reputation: 1,827

Next

Return to How do I....?

Who is online

Users browsing this forum: newt, ST314 and 27 guests