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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.