Sign in to follow this  
Maharl

Weird tile bug when the camera is moving

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.

 

 

Share this post


Link to post
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.

 

Share this post


Link to post
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:
 

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.