Difference between 0 Opacity and Invisable?

Discussion and feedback on Construct 2

Post » Mon Apr 30, 2012 3:13 pm

In addition, if I go to a new layout, but don't destroy all the objects, or make them invisible will they still be held in memory?
B
29
S
8
G
4
Posts: 61
Reputation: 6,205

Post » Mon Apr 30, 2012 3:24 pm

Sorry, to ramble on over several posts, but just to clarify, is the position, angle, size etc of an invisible object much of an overhead (specifically on slower android systems)?

If I were to add an extra check for objects (as visible or invisible) would this save logical resources or just mean a whole load of extra checking, using up more resources? Also, if a layer is invisible, would the objects on it be marked as invisible if checked individually?

Thanks

B
29
S
8
G
4
Posts: 61
Reputation: 6,205

Post » Mon Apr 30, 2012 3:56 pm

All objects are in memory, all the time. If not, you would suffer massive stuttering. However, when an object is invisible, you save ressources on all calculations (when an object is invisible, you don't have to worry about polygons collisions and all that, for example).
B
33
S
9
G
6
Posts: 709
Reputation: 6,704

Post » Mon Apr 30, 2012 5:22 pm

@Nathan

There are two issues here: rendering performance (the time it takes to draw it) and logic performance (the time it takes to process events, collisions etc. for the object). Invisible objects, or objects on invisible layers, don't take any rendering time, but their logic performance is unaffected - events obviously keep running for invisible objects!

Trying to change your events to make it faster is usually pointless: I doubt you can measure any improvement at all changing your events to improve logic performance. Game performance is usually 90% the rendering performance.

As for size/position/angle: the short answer is no, it doesn't affect performance. The long answer is it can if the rendering is software rendered, but usually software rendered platforms are not particularly usable anyway (they're too slow overall). On hardware-accelerated systems it makes no difference at all.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Previous

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 17 guests