Closed damian-pastorini closed 5 days ago
After further test "extrude" the tiles is still required in some cases:
I'm trying to fix the tileset in betwee, but getting the spacing / margin support fixed would help.
Thanks again!
Update: the issue is when you combine: load.spritesheet with tilemaps with spacing / margin, it just doesn't work since 3.80.
scene.load.spritesheet(imageFile, /assets/maps/${imageFile}, tileData); scene.load.image('Desert', 'https://demo.reldens.com/assets/maps/reldens-house-1.png');
Issue visible here: https://phaser.io/sandbox/5orKEN3E switch between 3.80 and 3.70.
Strangely, simply swapping the example to load.image
worked perfectly (instead of load.spritesheet
which is rarely needed for a tileset), which at least allowed me to narrow it down and find a fix in the Texture class.
Version
3.80.1
Description
Since 3.80 if you try to use a Tilemap with spacing and/or margin the Tilemap displayes fully broken (tiles out of place):
Example Test Code
My code base is quite big by now, but it's open source, so my implementation can be see between: https://github.com/damian-pastorini/reldens/blob/master/lib/game/client/scene-preloader.js and https://github.com/damian-pastorini/reldens/blob/master/lib/game/client/scene-dynamic.js
To summarize it, I'm using:
And then:
These files will show the broken case:
These are loaded fine in the TileMapEditor app and work fine in version <=3.70. You can see it in my demo (https://demo.reldens.com):
If I remove the margin and spacing then it works fine in >=3.80:
Additional Information
I've been using the Tile extruder and adding margin and spacing to the maps because prior to 3.80 I've always had the "extrude" issue when the player moves and then you see the lines between the tiles, but if I resize the files to their original 32x32 and remove the spacing and margin the "extrude" issue is not visible anymore, so though the spacing support is broken now I was able to avoid the original issue anyway.
Thanks for all your hard work!!!