Greetings!
My next project will need some form of tile engine and my understanding is that, due to current limitations of Corona, you pretty much can’t create a per-formant engine at this time.
One among many examples would be that creating a simple 100x100x3 map with 32x32 tiles would create 30k display objects (about 8m of ram in my tests) that you would need to shove into a display group. As there is no real ‘camera’ in order to handle scrolling of the map you actually must move the display group containing all of those images.
Even if we get beyond the realities of what 30k tiles does to the render loop by conditionally setting tiles to visible/invisible as the map moves we’re still left with the fact that even my Core i7 drops to 20fps when dragging that group containing 30k tiles.
So, my question is, how do we get around that?
Would a valid solution be to paint 2 or 3 1024x1024 tilemaps in Tiled then save the maps as an image which are then stitched together on the screen and moved around? I would assume that the performance would be much better in that case. Unfortunately I haven’t had time to test my theory as of yet.
At that point we would first need to map x,y coordinates to a ‘cell’ or ‘tile’ in the map. Then, uing that ‘map space’ coordinate, index into a 100x100 table. Each cell of that table would contain a reference to a TileData object that stores whether or not cell is passable, etc, etc.
Does the above sound workable? Can anyone think of other viable solutions to the problem other than ‘wait for corona support for tilemaps to improve so that Lime will eventually work as advertised’ ? [import]uid: 50570 topic_id: 9389 reply_id: 309389[/import]
