Regarding Graphics and Performance?

Get help using Construct 2

Post » Thu Feb 13, 2014 10:45 am

[QUOTE=TiAm] @Bertie Booster

Thanks for all of those! Curious about a couple:

[QUOTE=Bertie Booster]A 32px square with collisions set to bounding box causes much more stress on the fps rate than the same square with the collision boundary set to (1,1),(31,1),(1,31)(31,31).[/QUOTE]

???

[QUOTE=Bertie Booster]Try rotating a square 45 degrees if it doesn't affect the objects interaction it can reduce collisions.[/QUOTE]

Why would this be? Maybe because there are generally more vert/horz surfaces than diagonal, and rotating the square means you touch most objects with just the tip of your col poly?

Collisions really do eat up a lot of cpu. Col cells really help, but if you have a lot of moving objects in a small space, it can still get very laggy, very quick. However, with some thought, there are usually optimizations that can be done (many involving checking cols less often).[/QUOTE]

Ah this wont always be the case, but in certain types of games such as grid based games, bringing the coll polys in from the edge has the effect of stopping them from colliding with adjacent cells.
Again rotating 45 deg wont always work but it can reduce the contact points/area of contact on a face which can help reduce collision count.
I'm advocating being creative and spending time playing with the coll polys to see if you can optimise, the results can be dramatic. Bertie Booster2014-02-13 10:46:18
There are 10 types of people in the World, those that understand binary and those who don't.
B
7
S
2
Posts: 93
Reputation: 797

Post » Thu Feb 13, 2014 10:49 am

[[email protected]] Also, be aware that laptops can present a problem if you're using WebGL in any way on those layers. I had a game I made in C2 where the game ran really slowly at random points and I couldn't work out why.

Turns out that when the game was running slowly my laptop was running off the battery. When that happens, many laptops disable the 'higher level' graphics chips to save power. This is worth keeping in mind both for debugging and for when considering distribution.

Is there a way to get round that, now that I think about it?[/QUOTE]

yes, in your energy power savings / performance, set it to maximum performance.

It will cause your laptop to runn full power regardless of batteries or net power.
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,592

Post » Thu Feb 27, 2014 11:08 am

@Bertie Booster
Sorry but how can i do this:

"Turn off collisions on objects that don't need them"
B
7
S
1
Posts: 65
Reputation: 586

Post » Thu Feb 27, 2014 11:47 am

Click on a sprite and in properties there's an attribute "Collision". Set it to disabled.
B
14
S
3
G
1
Posts: 255
Reputation: 2,027

Post » Fri Feb 28, 2014 11:22 pm

Thank's Rabenmutter

@Ashley
Is this true :
"Turn off collisions on objects that don't need them"
B
7
S
1
Posts: 65
Reputation: 586

Post » Sat Mar 01, 2014 12:12 am

slanw wrote:Thank's Rabenmutter

@Ashley
Is this true :
"Turn off collisions on objects that don't need them"


Would it not be quicker, easier and more...... educational to simply try it and see what happens?
There are 10 types of people in the World, those that understand binary and those who don't.
B
7
S
2
Posts: 93
Reputation: 797

Post » Sat Mar 01, 2014 12:18 am

While we're on sprite objects, if I create a blank (making it invisible) sprite so that an event occurs if a player clicks on it, how much space [& resources] does it use compared to a graphically full sprite?
And is there a better way to do this?
B
28
S
9
G
2
Posts: 154
Reputation: 2,868

Post » Sat Mar 01, 2014 8:06 am

Well, if an object is invisible (not 0 opacity, has to be properly invisible) it doesn't make draw calls. Also, if you turn collisions off -- and you have to do that, they default to 'on' -- that lowers your overhead.

Even if you aren't testing for collisions with a particular object, just having collisions on can eat up a significant amount of overhead.
Don't lose your work. Backup your game with Dropbox.
B
44
S
10
G
10
Posts: 1,106
Reputation: 9,202

Post » Sat Mar 01, 2014 10:50 am

Bertie Booster wrote:
slanw wrote:Thank's Rabenmutter

@Ashley
Is this true :
"Turn off collisions on objects that don't need them"


Would it not be quicker, easier and more...... educational to simply try it and see what happens?


How can i know if i have ton's of objects, particles and sound files !!!
B
7
S
1
Posts: 65
Reputation: 586

Post » Sat Mar 01, 2014 1:57 pm

slanw wrote:Thank's Rabenmutter

@Ashley
Is this true :
"Turn off collisions on objects that don't need them"


No, it's not true. As of r161 objects which don't have any collisions tested against them do no collision-related work at all, so the option has no effect if you already don't test for collisions on that object.

Even before then it would have made such a tiny difference as to be unlikely to be measurable. As with any performance question, measurement is king: if you cannot measure a performance difference, it either does not affect performance, or has such a small effect as to be ignorable.

Everything likely to affect performance has already been listed in Performance tips. Anything not in that page is not generally something that has a significant effect.
Scirra Founder
B
402
S
238
G
89
Posts: 24,637
Reputation: 196,071

PreviousNext

Return to How do I....?

Who is online

Users browsing this forum: dop2000 and 6 guests