Jump to content

Tilemap Displays Grid Lines (Render Artifacts)


bryantmakesprog
 Share

Recommended Posts

Very excited to announce that my first phaser project is nearing completion. As I'm ironing the last couple kinks out, I'm stuck with one issue which requires further assistance.

My tilemap has lines between the tiles! Now, I know this is a render artifact that occurs occasionally with pixel art, but I don't know how to compensate for it. I ran into a similar issue with Unity a while back, but I can't recall how I went about fixing it.

Any thoughts?

 

phaster_artifacts.png

Link to comment
Share on other sites

This issue will appear always with whatever tiling you use if you render it on the GPU and scale things around. It's just how GPUs work.

To fix it, you need to extrude your tiles in the texture atlas. That is, repeat the border pixels of every tile. Texture Packer can do that, or do it yourself in your assets pipeline.

It's called pixel bleeding and what happens is that due to how GPUs work, pixels beyond the tile are sampled from the texture atlas, resulting in artefacts like this.

Link to comment
Share on other sites

I can give it a whirl. I am unfamiliar with Texture Packer or extruding though. So my current tilesheet represents 16px tiles. I would end up with a tilesheet of 18px tiles? Would I need to account for this in the code or is this just an adjustment to the image file?

Of note, I just remembered the unity solution was to switch bilinear to linear. Not sure what that means (nor did I at the time), but it remedied the issue.

Link to comment
Share on other sites

Thanks guys, I believe I can make this work :)

Oddball question too while I have you a captive audience:

Currently the camera is set to follow the player. I actually want to nudget it just a tad below the player so the entire scene shifts up a couple pixels. Thoughts on how best to accomplish this?

Link to comment
Share on other sites

5 hours ago, rich said:

Rich, the tool you recommended seems to continually spit out ": No such file or directory", even when running `tile-extruder --help`. Thoughts? 

Normally I wouldn't ask that sort of question here, but I thought your referencing the tool may have indicated you have some inside knowledge.

Link to comment
Share on other sites

On 6/8/2018 at 4:31 PM, bryantmakesprog said:

Thanks guys, I believe I can make this work :)

Oddball question too while I have you a captive audience:

Currently the camera is set to follow the player. I actually want to nudget it just a tad below the player so the entire scene shifts up a couple pixels. Thoughts on how best to accomplish this?

Anyone have thoughts on this? 

(That worked Aylictal; issue was on my Ubuntu distribution. Running it on Windows went fine.)

Link to comment
Share on other sites

  • 1 month later...
 Share

  • Recently Browsing   0 members

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