Issue with tileset bleeding?

So I’ve tried to change

const tileset = map.addTilesetImage ( 'kenney_simple_platformer', 'tiles', 64, 64, 1, 2 );

in order to stop tile bleeding, & even though i properly extruded my tileset using node’s tile-extruder like so :

tile-extruder --tileWidth 64 --tileHeight 64 --margin 0 --spacing 0 --input tilesets\platformPack_tilesheet_original.png --output tilesets\extruded\platformPack_tilesheet.png

AS WELL AS adding proper margin & proper spacing, it still seems to show like this :

Note: to download tile-extruder simply do :

npm install -g tile-extruder

& it will install as a global nodeJS command line program.


instead of removing tile bleeding like it claims to do

Here’s the ORIGINAL ( 64 x 64 ) tileset WITHOUT extrusion :

Here’s the EXTRUDED tileset ( 66x66 tiles ) ( I used NO margin or spacing when generating the extrusion ) :

Here’s the link to the github project :

--- NOTE : **Please REMOVE index.html & keep index.php**, index.html is actually a bad attempt at trying to create a github page.

Based on docs: https://photonstorm.github.io/phaser3-docs/Phaser.Tilemaps.Tilemap.html#addTilesetImage

Your code seems to be set the tileMargin and tileSpacing in 1 & 2.
Then I guess that you should set that value too on tile-extruder command., like:

tile-extruder --tileWidth 64 --tileHeight 64 –margin 1 –spacing 2
–input tilesets\platformPack_tilesheet_original.png --output
tilesets\extruded\platformPack_tilesheet.png

Let see if still won’t work. Thanks.

@ReydVires : It didn’t work. It gave me an error.

tile-extruder --tileWidth 64 --tileHeight 64 --margin 1 --spacing 2 --input assets\tilesets\platformPack_tilesheet_original.png --output assets\tilesets\extruded\platformPack_tilesheet.png

Error: Non-integer number of rows or cols found The image doesn't match the specified parameters. Double check your margin, spacing, tileWidth and tileHeight...

ah nvm, maybe I’m wrong. Mind if I know the .json file for that tileset?
you need to change into this default space and margin in that file
{ "columns":14, "firstgid":1, "image":"..\/tilesets\/platformPack_tilesheet.png", "imageheight":462, "imagewidth":924, "margin":1, "name":"kenney_simple_platformer", "spacing":2, "tilecount":98, "tileheight":66, "tilewidth":66 }
on Tiled

Yes I uploaded the JSON file level1A.json (342.7 KB)

Here’s what happens when I do :

const tileset = map.addTilesetImage ( 'kenney_simple_platformer', 'tiles', 66, 66, 0, 0 );

I get :

As you can see, the tiles LOOK fine but there are now semi-transparent lines in them…

Turns out I fixed it. Problem now is, my character is now shaking whereas before with the original 64x64 sized tiles, it didn’t shake at all.

The map size I chose in Tiled is : 256x256 with : margin : 1, spacing : 2

The size of the whole tileset is : 952x476

Here’s the tileset which is 66x66, ALSO with : margin : 1, spacing : 2 :

The above tileset is extruded.

Here is the new level1B.json file :

level1B.json (342.5 KB)

Here is the updated github branch that reproduces the player shaking bug I’ve been having :

I have also included the level1B.tmx file here as well to quickly take a look at in Tiled 1.24:

I think I may have just fixed ALL of it! I re-extruded the original tileset and BOOM! It worked. No shaking, NO LINES! :smiley:

I’ll report my results here soon.