Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Performance question regarding .isVisible and groups
Started by d.mach Apr 12 2019 08:31 AM

- - - - -
1 reply to this topic
performance .isvisible groups tiles tiled editor
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

d.mach

[GLOBAL: userInfoPane.html]
d.mach
  • Contributor

  • 849 posts
  • Corona SDK

I wonder how I can speed up performance for this example:

 

I have put a lot of ground tiles into a group. Now moving the group is very slow. I normally had used DUSK and TILED to build tiled maps. DUSK did make all tiles in a group object inactive when they moved out of screen, so only the visible tiles were calculated.

 

Now I wonder how this was done and how I can rebuild this with my own approach? Is it enough to check for out of screen tiles in the group and then set .isVisible to false?

 

Thanks for your help!

 



[TOPIC: post.html]
#2

nick_sherman

[GLOBAL: userInfoPane.html]
nick_sherman
  • Corona Geek

  • 1,803 posts
  • Corona SDK

SGS may be able to answer more fully, but I believe he only creates display objects for visible tiles in Designer City etc. Tiles that are off screen are still in a table so that things can happen to them (i.e. buildings develop, citizens move there), but there will be no display object to represent them until they come into view.

 

It's unfortunate there aren't any supported tile engines left (apart from Qiso, but that's isometric only I believe) as they would do all this for you. 




[topic_controls]
[/topic_controls]

Also tagged with one or more of these keywords: performance, .isvisible, groups, tiles, tiled, editor