Optimize Physics Performance?

Get help using Construct 2

Post » Mon Nov 19, 2012 6:51 pm

Hey,

creating a game completely based on physics, with polygon based landscape, bombs, explosions and such stuff...

could you help me find out how to get the maximum fps of the physics engine?
B
15
S
3
G
5
Posts: 396
Reputation: 4,977

Post » Mon Nov 19, 2012 8:02 pm

For any of your objects that don't require the most accurate physics calculations, you can tone down their physics interations which is a big performance boost.

Here's the part of the manual in the physics object

Action

Set stepping iterations
Set the number of velocity iterations and position iterations used in the physics engine. The default is 8 and 3 respectively. Lower values run faster but are less accurate, and higher values can reduce performance but provide a more realistic simulation.

https://www.scirra.com/manual/98/physicsjustifun2012-11-19 20:02:38
B
50
S
21
G
8
Posts: 844
Reputation: 10,299

Post » Tue Nov 20, 2012 6:49 pm

Is there a way to disable/enable physics? Like if I only want physics on my character after he has been hit, but not while he is attacking or running or anything?
B
32
S
4
Posts: 405
Reputation: 3,219

Post » Tue Nov 20, 2012 11:52 pm

You could try swapping out the regular character object with a physics version of that character.

When the character gets hit, you lock the controls, make invisible, and create the physics character in it's place.

When the physics character "is sleeping" destroy it and with the regular character; unlock the controls, make visible, and move it's position to match.

Hard to know how ridiculous that would look, haha, but maybe it's worth a try :)
B
12
S
4
G
2
Posts: 59
Reputation: 3,739

Post » Wed Nov 21, 2012 8:15 pm

bscarls's question is good, would also like to know about how to disable physics.

thanks for the other good ideas, any suggestions still welcome!
B
15
S
3
G
5
Posts: 396
Reputation: 4,977

Post » Fri Nov 23, 2012 5:53 pm

I'm getting working with collisions soon for my game.    I'll go about it the way floor advised and let you guys know how it worked!
B
32
S
4
Posts: 405
Reputation: 3,219


Return to How do I....?

Who is online

Users browsing this forum: blackhornet, jeffige, TheHat, Yahoo [Bot] and 0 guests