My project works on 55-60FPS on the iPhone 6, but something older does not play at all, because something is eating the processor.
I think the problem is with the number of tiles and layers on my map (64x256 with 4 layers), and the tools show "SKCRenderer: preprocessSpriteImp (..." takes 5198 ms (23.2%) of the execution time.
Does JSTileMap load every single image fragment (visible or not) right away? This message from RW indicates that it is, and that it could be dispensed with to increase performance: http://www.raywenderlich.com/forums/viewtopic.php?f=29&t=9479
In another performance note, the Sprite Kit checks all the nodes and decides which ones to display each frame. If you have a large tile map, this can be a big success. JSTileMap loads all nodes (SKSpriteNode for each tile) when it loads a tile map. So I also saw performance issues in the Sprite Kit version with my card (500 x 40 in size). I added a check to my version of JSTileMap, which is included in the kit, which marks a hidden property of each tile, then intelligently hides and hides only the tiles that enter / exit the screen. This improves the performance of these large cards significantly.
Unfortunately, this post does not cover the details of the steps taken to eliminate this.
My first thought was that (I'm a beginner, please be careful) create an array of nodes by going through each point and checking the fragment on a specific layer. From there I will work on adding / removing them based on distance from the player.
This did not work, because the process of adding nodes to the array simply made the application hang forever on large maps.
Can someone lend a hand? I would like to work with larger / more complex fragments, but this performance problem is ruining my brain.
Thank you for reading!
UPDATE: Thank you very much SKAToolKit: https://github.com/SpriteKitAlliance/SKAToolKit
Their culling function solved my problem, and now I am launching even larger cards with less than 35% processor.