How do I performance optimisation !!!

Get help using Construct 2

Post » Mon Apr 28, 2014 2:12 am

hi all,
i read all tutorial about game optimisations and that give me some results but i just want to know ...
specially on ios ...
when we destroy object when its out side layout (specially animated one) .... that affect the optimisations (fsp and processeur memory usage ... ) ???
i have make game ... and sometimes when i simulate it on xcode i get 54 on fsp and 98% processor usage and game turn to be slower ....

thanks for reply
i use ejecta to export and my game is simple ...
B
46
S
16
G
8
Posts: 794
Reputation: 8,335

Post » Mon Apr 28, 2014 12:01 pm

Anything not in the 'Performance tips' article is generally not important to performance.
Scirra Founder
B
397
S
236
G
88
Posts: 24,408
Reputation: 194,496

Post » Mon Apr 28, 2014 6:53 pm

mmmm ok
but can you explaim me why ?

and you prefer destroy the object or not ?
B
46
S
16
G
8
Posts: 794
Reputation: 8,335

Post » Fri May 02, 2014 8:49 am

if we destroy object ... outside layout ... may this will reduce collisions calculations ? no ?
Last edited by matrixreal on Fri May 02, 2014 9:23 am, edited 2 times in total.
B
46
S
16
G
8
Posts: 794
Reputation: 8,335

Post » Fri May 02, 2014 8:57 am

matrixreal wrote:if we destroy object ... outside layout ... may this will reduce collisions calculations ? no ?

Objects outside layout are not included in collision detections so it wouldn't change anything in this regard.
B
44
S
11
G
2
Posts: 1,182
Reputation: 6,848

Post » Fri May 02, 2014 9:24 am

thanks nimos100
other question ... if we reduce collisions polygone (of player and ennemy for example) ... will this affect collisions calculations and also some performance ?
B
46
S
16
G
8
Posts: 794
Reputation: 8,335

Post » Fri May 02, 2014 9:41 am

Getting rid of objects outside layout will help (they normally are collision checked, and even if not because of collision cells, it still helps a little), reducing collison polygon of object could help during intense phases.

If your ennemies have an AI that doesn't need to be active when not on screen, you could do something for that too.

Some collisions maybe could be check only each other ticks.

At the end, the goal is to keep the amount of calculations as low as possible, while preserving the game.
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 » Fri May 02, 2014 9:50 am

Aphrodite wrote:Getting rid of objects outside layout will help (they normally are collision checked, and even if not because of collision cells, it still helps a little), reducing collison polygon of object could help during intense phases.

If your ennemies have an AI that doesn't need to be active when not on screen, you could do something for that too.

Some collisions maybe could be check only each other ticks.

At the end, the goal is to keep the amount of calculations as low as possible, while preserving the game.


thanks aphrodite ... you are really like aphrodite in mythology (saverrrr)
yes this why i was thinking to destroy object when its outside layout maybe will reduce the collisions calculations ... so as i understand i will help (just little but better than nothing ...)
and for reduce polygons collisions on object (as you sad i have object with some parts that not need to be checked for example only their X and not ther Y so ... that will help ??? yes ?

finally i just not understand something ...
when you say "Some collisions maybe could be check only each other ticks."
that mean that i have to add another condition to "when object 1 is on collisions with another object B" for example every tick or every seconde ?

thanks a lot for all

i just finish my game and publish it on appstore ... but i see that its slower on iphone 4
so i would like to improve performance at maximum for iphone 4
B
46
S
16
G
8
Posts: 794
Reputation: 8,335

Post » Fri May 02, 2014 10:06 am

matrixreal wrote:
thanks aphrodite ... you are really like aphrodite in mythology (saverrrr)
yes this why i was thinking to destroy object when its outside layout maybe will reduce the collisions calculations ... so as i understand i will help (just little but better than nothing ...)
and for reduce polygons collisions on object (as you sad i have object with some parts that not need to be checked for example only their X and not ther Y so ... that will help ??? yes ?

finally i just not understand something ...
when you say "Some collisions maybe could be check only each other ticks."
that mean that i have to add another condition to "when object 1 is on collisions with another object B" for example every tick or every seconde ?

thanks a lot for all

i just finish my game and publish it on appstore ... but i see that its slower on iphone 4
so i would like to improve performance at maximum for iphone 4


For the collisions, C2 already checks only the bounding box first, then if the bounding box are indeed colliding(very fast to calculate), it checks the true collisions, this can be slower depending on the complexity of the collision polygon, also C2 arranges everything in different cells (areas) if it is possible to reduce the collision checks, but other than that, I do not know much about how it is done.

As for not checking every tick, I would say for exemple a large (relatively speaking, testing will tell if it works or not) projectile can checks if it is colliding with the player only one tick out of two for exemple, to achieve that, you can add the system condition "Compare two values: tickcount%2 equal to 0", that may help (it could also cause problems in some cases, but I consider that this kind of projectile will be destroyed right after colliding)

I do not know much about your game so I cannot help a lot, the debugger feature of C2 may help you see what parts are cpu consumming.

Also, it may be possible that graphics are what kneel you game down, but not 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 » Fri May 02, 2014 11:58 am

Getting rid of objects outside layout will help (they normally are collision checked, and even if not because of collision cells, it still helps a little),

What do you mean with that they are normally checked if outside layout, its standard that they are excluded if outside layout, or do you mean something else?
B
44
S
11
G
2
Posts: 1,182
Reputation: 6,848

Next

Return to How do I....?

Who is online

Users browsing this forum: bclikesyou, kellehk, ST314 and 23 guests