How do I new cell render in r191 ?

Get help using Construct 2

Post » Thu Dec 11, 2014 12:08 am

hi,

i see that ashley add new feature with new cell render related with z order
i dont understand that well (i just read the blog of ashley about that ) but i need more

any simple example to see how to use it ?

thanks
B
46
S
16
G
8
Posts: 794
Reputation: 8,335

Post » Thu Dec 11, 2014 1:55 am

Well, I think Ashley's blog was pretty exhaustive, and included example cases where render cells would be helpful.

Basically: good for large layouts where you have lots of static objects that don't move or change their z order.

Put all those static objects on one layer and enable render cells for said layer.

Make sure not to put any other objects on that layer that you would be repositioning (moving or rotating; opacity changes are fine) regularly.

Enjoy better framerates (assuming you have > 1000 static objects).
Don't lose your work. Backup your game with Dropbox.
B
44
S
10
G
10
Posts: 1,106
Reputation: 9,202

Post » Fri Dec 12, 2014 1:24 am

Yes That me if i have large layer with 100 object living with bullet That i hâve pour the same layer and enable the cell render?
B
46
S
16
G
8
Posts: 794
Reputation: 8,335

Post » Fri Dec 12, 2014 2:37 am

matrixreal wrote:Yes That me if i have large layer with 100 object living with bullet That i hâve pour the same layer and enable the cell render?



I guess you are asking if, if you have 100 object with bullets, the render cell is worth ut, well, it seems that it may not be worth it in that case as this feature saves up time for non moving objects (if you have a huge mostly static scenery, it is worth it, however, due to the fact it is more a micro optimisation applied to a lot of objects, the performance gain can be lower than the cost, and moving objects should avoid that as in their case, it is a loss: checking if they need to change their cells cost much than not using them)

also keep in mind that this option was introduced especially for gales with large environnements composed of a multitude of single non changing instances that do not move (movement related to the layer they are on).

however, since you can turn it on and off in entire layers, you may be able to just test it out and see if that works well or not in your case.
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 Dec 12, 2014 3:25 am

Bullets would seem to be the worst thing to put on a render cells layer. They are always moving. I would guess enabling render cells in such a case would result in worse performance.

As always, test and see. Maybe you'll be surprised.
Don't lose your work. Backup your game with Dropbox.
B
44
S
10
G
10
Posts: 1,106
Reputation: 9,202

Post » Fri Dec 12, 2014 5:19 pm

Render cells only benefit when you have thousands of static objects. Read the blog post on how render cells work. 100 objects is probably too few to show any benefit, and if they are moving (since they have the bullet behavior), using render cells could actually make it a bit slower.

As the blog post recommends, the time to use it is when you can actually measure an improvement.
Scirra Founder
B
398
S
236
G
88
Posts: 24,441
Reputation: 194,681


Return to How do I....?

Who is online

Users browsing this forum: dand and 24 guests