Cocos2D continuously scrolling tile based game : Strange flash only in device

后端 未结 1 630
南方客
南方客 2020-12-06 08:49

Thanks for your helping mind and reading this.

Here is my source: Download_Cocos2d_Continuous_Scrolling_Tile_Based_Game

Its continuously scrolling tile based

相关标签:
1条回答
  • 2020-12-06 09:33

    By loading the tilemap asynchroneously you are merely replacing the loading time interruption with a short time where cocos2d doesn't have anything to render - until the new tilemap is loaded. I'm guessing threading is not a fix here, it just gives you a different symptom for the same problem.

    I think the ways you can fix this is by:

    • start threaded loading a certain threshold before the newly loaded tilemap section needs to be displayed
    • creating smaller subsection tilemaps (ideally as small as screensize or a bit larger) so they load faster
    • preload tilemaps into memory, but set visible = NO for those which aren't supposed to be rendered

    If you can't load all tilemaps simply due to the memory they consume and the other options won't work either you're out of luck unless you can implement your own, memory-optimized version of a tilemap system.

    0 讨论(0)
提交回复
热议问题