The New Render Cell Feature

Discussion and feedback on Construct 2

Post » Tue Jan 20, 2015 9:05 pm

Hi All,

I've been reading up on the Render Cell feature that has just been added, and I have a couple questions I'm not quite sure how to answer:

1. I have a few thousand objects per layout - most of which are static. However, instead of creating 10 sprites for each individual object, I usually create 1 sprite and add 10 frames to a single animation and turn the speed to 0. Will this negate the effect of the Render Cells?

2. Some of my static objects have minor angle sine behaviors (nothing that would take it out of a cell, I wouldn't think). Will sprites with behaviors like that be problematic?

3. By turning it on in my most "static object" layers, I still don't see any difference in CPU. Does that mean they were never really an issue to begin with? Or am I missing something?
B
43
S
12
G
1
Posts: 545
Reputation: 4,246

Post » Wed Jan 21, 2015 12:42 am

1) I believe it's instance-based, so no.
2) Eh, probably not.
3) Rendering cells are generally used for scenery in extremely large layouts. If your levels are moderately sized then there likely won't be any discernible difference.
Image
B
243
S
30
G
13
Posts: 1,787
Reputation: 18,770

Post » Wed Jan 21, 2015 3:34 am

@Tokinsom - Thanks for the response!

re: 3, my layouts are around 50,000 x 20,000 with over 4,000 objects in the layout. I feel like that's a lot, especially for an HTML game. Is it not?
B
43
S
12
G
1
Posts: 545
Reputation: 4,246

Post » Wed Jan 21, 2015 6:20 am

Layout size really doesn't make much difference, even for gargantuan layouts.

4000 objects isn't necessarily bad either, as long as most of them are static. Actually, if they are spread out across the layout, that makes things even easier, since the opts for collision cells and render cells come into effect.
Don't lose your work. Backup your game with Dropbox.
B
44
S
10
G
10
Posts: 1,106
Reputation: 9,202

Post » Wed Jan 21, 2015 6:46 am

Ashley said somewhere that it's best to have single static frame sprites for BG, as having 1 sprite with heaps of frames increases CPU usage for some reason.
B
151
S
75
G
20
Posts: 1,793
Reputation: 22,749

Post » Wed Jan 21, 2015 7:19 am

@alspal - well that's just not good lol. It's a little late to fix that now...heaps would only be a max of 10 or so.
B
43
S
12
G
1
Posts: 545
Reputation: 4,246

Post » Wed Jan 21, 2015 11:27 am

ome6a1717 wrote:1. I have a few thousand objects per layout - most of which are static. However, instead of creating 10 sprites for each individual object, I usually create 1 sprite and add 10 frames to a single animation and turn the speed to 0. Will this negate the effect of the Render Cells?

The engine only ticks sprites with more than animation frame *and* a nonzero animation speed. So if the speed is 0 it will still be a static object. Note if you change the animation speed, it will start ticking it again.

2. Some of my static objects have minor angle sine behaviors (nothing that would take it out of a cell, I wouldn't think). Will sprites with behaviors like that be problematic?

Moving objects becomes more expensive on render cell layers, so for ideal performance they should go on a non-render-cell layer. However if there are only a very few objects it probably doesn't matter.

3. By turning it on in my most "static object" layers, I still don't see any difference in CPU. Does that mean they were never really an issue to begin with? Or am I missing something?

You should check on a low-end system or mobile device to see if there's any measurable difference. If there's no measurable difference, either you don't need to use it, or you have enough moving objects to negate the performance benefit.
Scirra Founder
B
400
S
236
G
89
Posts: 24,546
Reputation: 195,471

Post » Wed Jan 21, 2015 5:19 pm

@Ashley - Ok, phew! Thanks, Ashley!
B
43
S
12
G
1
Posts: 545
Reputation: 4,246


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 12 guests