Question about Render cell in 191

Discussion and feedback on Construct 2

Post » Fri Dec 05, 2014 6:17 pm

Hey Ashley, thanks for the new update, you always deliver awesome improvements!

I have a huge layer with hundred (and sometimes thousands) objects.

Those objects are static, they only update variables once every 48 sec, but they have Sine (angle and opacity) happening from time to time for long periods of time.

Is it convenient to enable the new Render cell option from r191? I'm testing CPU usage with the debugger, but still can't find any difference. I just need to be sue i'm using the right criteria to enable the new feature after reading yur article on cell rendering.
Last edited by Danwood on Fri Dec 05, 2014 6:31 pm, edited 1 time in total.
B
63
S
22
G
4
Posts: 357
Reputation: 6,503

Post » Fri Dec 05, 2014 6:27 pm

As ever the answer depends on measurements. If you can measure an improvement, then yes!

Ideally you would move any moving objects to their own layer, so the one using render cells is truly static.
Scirra Founder
B
387
S
230
G
87
Posts: 24,249
Reputation: 192,240

Post » Fri Dec 05, 2014 6:34 pm

Ashley wrote:As ever the answer depends on measurements. If you can measure an improvement, then yes!

Ideally you would move any moving objects to their own layer, so the one using render cells is truly static.


Thanks, i made some mesurements and it doesn't seem to differ much (it is hard to measure though, since it fluctuates a lot).

So sine opacity and angle will also make the object update render cell? In that case, i will move the "sine-ing" objects in another layer as you suggested.
B
63
S
22
G
4
Posts: 357
Reputation: 6,503

Post » Fri Dec 05, 2014 10:46 pm

@Danwood

For more info on render cells, Ashley has a new, in depth blog post:

https://www.scirra.com/blog/ashley/14/h ... cells-work
Don't lose your work. Backup your game with Dropbox.
B
44
S
10
G
10
Posts: 1,106
Reputation: 9,187

Post » Fri Dec 05, 2014 11:39 pm

TiAm wrote:@Danwood

For more info on render cells, Ashley has a new, in depth blog post:

https://www.scirra.com/blog/ashley/14/h ... cells-work


Yep i've checked it, my question regards this part:

When to avoid it?
Any layers with lots of changing objects - either creating, destroying, moving or changing Z order - will probably incur more extra work than is saved by the cheap viewport checks


Does it include opacity/angle sine? If i have 1000 objects iwth angle or opacity sine, does it count as trade-off for cell rendering?
B
63
S
22
G
4
Posts: 357
Reputation: 6,503

Post » Fri Dec 05, 2014 11:55 pm

Changing opacity won't create any extra render cell work (it's not moving or Z ordering), but changing the angle counts as moving.
Scirra Founder
B
387
S
230
G
87
Posts: 24,249
Reputation: 192,240

Post » Sat Dec 06, 2014 12:05 am

Ashley wrote:Changing opacity won't create any extra render cell work (it's not moving or Z ordering), but changing the angle counts as moving.


Thank you Ashley, that answered my question!
B
63
S
22
G
4
Posts: 357
Reputation: 6,503

Post » Sat Dec 06, 2014 12:08 am

@Danwood

Opacity...not sure about that one. Angle, yes, that seems like it might cancel it out, because you are 'moving' the object, or at least, the bounding box is changing (unless the object has symmetrical dimensions). Seems like the best thing to do is disable the behaviors as objects move on/offscreen.

EDIT: whoops, guess Ashley stepped in while I was writing and gave a definitive answer.

@Ashley

Does 'Is Onscreen' now take advantage of render cells? On a similar note, would there be a way to use render cells to provide a 'Pick by distance from point' command?
Don't lose your work. Backup your game with Dropbox.
B
44
S
10
G
10
Posts: 1,106
Reputation: 9,187


Return to Construct 2 General

Who is online

Users browsing this forum: Cliffu and 8 guests