Scaling my map?

Hello!

Is it possible to scale my map? I mean, my tilesets are 16x16 pixels, do they HAVE to be displayed on a 1:1 ratio? I managed to mess with the scale on the pre-beta version, but now I forgot how to.

I saw the xScale and yScale for the tiles under the LDI docs, but would I just cycle through all tiles and adjust their scale there? Then after that do I need to adjust the offset?

Let me know what direction to head, I appreciate the help!

-Mario [import]uid: 11636 topic_id: 4512 reply_id: 304512[/import]

You have a couple of options, you could scale various tiles in your tileset so that they actually take up (for example) 4 tiles worth, which would mean you would have to draw 4 tiles to make 1 large one, or you could move a few tiles to a new tileset that have a larger tile size.

Or via the LDI you could set the xScale and yScale of a tile in a tileset which will automatically scale any tiles of that type in the game.

Or you could access them through code individually and scale them the usual Corona way via xScale and yScale or you could also scale the whole map in one go with map.world.xScale and map.world.yScale or an individual layer with layer.group.xScale and layer.group.yScale.

Hopefully that helps and if it wasn’t what you were after please give me a shout. [import]uid: 5833 topic_id: 4512 reply_id: 14282[/import]

Damn Graham, I was really hoping for more options…you only gave me *5*!!! Hahahahaha!!

That’s an excellent explanation of the plethora of scaling options available to Lime users! How very convenient and flexible!!

In the end though, this was exactly what I was looking for:

map.world.xScale = 1.82  
map.world.yScale = 1.82  

Thanks for your help! We’ll get this framework in top shape with my rigorous questions, I mean, testing!

Thanks!

-Mario [import]uid: 11636 topic_id: 4512 reply_id: 14302[/import]

Haha, well as a sixth option… :slight_smile:

Glad you got it working and remember that if you wanted you could set that lovely magic number in Tiled itself as a Map property that way allowing you to easily change the value for different levels (that is of course if you want that to be allowed)

Questions are great, keep them coming. Without questions there can be no answers…that was meant to be deep and meaningful but I think I’m too tired to try that :slight_smile:

I am currently working on the jumping tutorial, should have it up within the next couple of hours. [import]uid: 5833 topic_id: 4512 reply_id: 14304[/import]

The new tutorial is up! As well as the updated code that you will need for it to work. [import]uid: 5833 topic_id: 4512 reply_id: 14312[/import]

deleted…mystery double post [import]uid: 11636 topic_id: 4512 reply_id: 14303[/import]