Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]

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
This topic has been archived. This means that you cannot reply to this topic.
[TOPIC: post.html]


[GLOBAL: userInfoPane.html]
  • Contributor

  • 885 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]


[GLOBAL: userInfoPane.html]
  • Corona Geek

  • 1,825 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.