Jump to content

Weird tile bug when the camera is moving


Maharl
 Share

Recommended Posts

Here is the tile spritesheet : catastrophi_tiles_16.png

image.png.77d468244d9372b14f9b08ed2d117ed8.png

Example: https://labs.phaser.io/edit.html?src=src\game objects\tilemap\collision\csv map arcade physics.js

These white stripes appear when the camera moves in this example, I have this problem in my own game, any idea what one can do about it? The only thing I could think of doing about it was to add empty tiles to the tile sprite sheet so that transparent tiles would not get stripped by the tile beside it.

 

 

Link to comment
Share on other sites

The problem is that tiles drag in neighbour pixels. In your case I'd assume that it comes from the 3 empty tiles in the top row. The transparency creates these issues. This might also happen on other tiles if they drag in coloured pixels...

The best thing to do is to surround your tiles with a 1 pixel border that repeats the tile colours.

 

Link to comment
Share on other sites

Literally just ran into this same problem.

There are several considerations here.  Are you scaling your tiles?  If you are scaling by a non integer value, this sorta crap can happen.

This solution fixed all of my problems with this regard:
 

 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...