Manual occlusion needed?

Hi guys,
I was wondering if I need to manually occlude my sprites from showing up on screen or this has been done internally by corona?
I’m making a 2d rpg tilemap and was wondering should I just create my map with all its displayobjects and let corona handles the occlusion or do I need to sort my displayobjects and hide the rest that do’nt get shown on the screen.

Display object has isVisible properties, how much it’ll affect performance if I set it to false?

Thanks [import]uid: 76697 topic_id: 17278 reply_id: 317278[/import]

Corona wont occlude sprites or prevent from showing up on screen if you put them on screen - you’d have to do that yourself.

Peach :slight_smile: [import]uid: 52491 topic_id: 17278 reply_id: 65365[/import]

what will happen if you put them off screen (let’s say by changing their position)? [import]uid: 76697 topic_id: 17278 reply_id: 65562[/import]

In my own experience there is a noticeable improvement (~25%) in frame rate on slower devices when I set isVisible property to false for display objects that are off screen. As far as I can tell Corona wastes time rendering every off screen display object which can be a huge performance bottleneck when there are many objects. (Don’t be fooled by the simulator’s performance, check fps on actual target devices)

In my particular case I have several hundred objects, most of which are off screen at any given time, and I’m trying to maintain 60 fps. You might not see much improvement if most of your objects are on screen to begin with, if you only have a few dozen objects, if your app is set to run at 30 fps, or if your target is an iPad2. [import]uid: 9422 topic_id: 17278 reply_id: 65575[/import]

hmm isVisible=false does boost performance abit but not so much, I also have about hundred of sprites on the screen and many more offscreen.

I guess showing hundred of sprites on the screen is not doable yet :frowning: [import]uid: 76697 topic_id: 17278 reply_id: 65768[/import]