Efficient tile maps with touch scrolling and zooming

Hello everyone,

I’m creating a Corona SDK tile based game and I’d like to implement an efficient storing, rendering and touch support system for my levels. I use Tiled to design them and a simple xml lua parser to load them.

I saw another post in the forums that basically creates a matrix of Sprites with a given position and image. If the player scrolls you need to update every sprite’s position and image every frame and that must be very inefficient.

I’d like to avoid Lime because it’s a paid add on.

Any ideas? [import]uid: 65008 topic_id: 22388 reply_id: 322388[/import]

Scroll the whole group rather than the individual tiles. That will help [import]uid: 84637 topic_id: 22388 reply_id: 89288[/import]

Thanks about the answer, that works indeed. However, how can I zoom in without making the tiles overlap? Can I use the whole group for that as well? [import]uid: 65008 topic_id: 22388 reply_id: 89292[/import]

You can of course :slight_smile:

for instance

myGroup:scale(1.5, 1.5) [import]uid: 84637 topic_id: 22388 reply_id: 89293[/import]