englercj / phaser-tiled

A tilemap implementation for phaser focusing on large complex maps built with the Tiled Editor.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support of different tile sizes

entiendoNull opened this issue · comments

Hi there,

This is rather a question than an issue.

in Tiled it's possible to add tiles from different tile sets with different sizes to the same map.
For example, I've created a tilemap where tiles are 32x32px. I can however still add tiles where I, in my tile set, have specified the dimensions to be 64x64px.

skarmavbild 2017-06-15 kl 20 49 01

skarmavbild 2017-06-15 kl 20 49 28

However, when trying to render my map in Phaser it renders badly. I read somewhere that Phaser currently does not support support different sized tile sets. This is how I ended up here. Is this something that this plugin could currently solve? Or is planned for future development?

skarmavbild 2017-06-15 kl 21 30 20

Another feature in Tiled that Phaser does not seem to support is the drawing offset. In my case it makes a lot of sense to use it. I wrote a simple collision control (instead of using a Physics engine) for my game. These walls (64x64px) for example should only have collision at bottom right corner (32x32px) in order to sort of having e.g. characters placed "behind the wall".

skarmavbild 2017-06-15 kl 20 49 57

Is this issue anything that this plugin could solve? In worst case, I will probably have to cut my 64x64's in to pieces... and that will ruin the fun of building maps :/

Thanks for your time.

Have you tried turning on obeyRenderorder on the map? https://github.com/englercj/phaser-tiled/blob/master/src/tiled/Tilemap.js#L74