6. Fast forward to edge bleeding

My blog entries have been getting shorter because I got bored of re-doing parts of my project specifically for this blog. Also, I can't quite remember the stuff I changed lately so I will just fast forward to where I am now.

In the past few days I have been having problems with rendering my world. Out of the blue lines between tiles appeared, commonly called "edge bleeding" and I did not manage to fix it without having to put in some work. I first tried change some filter settings to using Nearest, but I failed horribly in finding where to change that due to all versions used in tutorials being deprecated.

My next step was putting a 1px transparent border around each and every tile. I tried finding an easy way that wouldn't destroy my Tiled map. This led me to use TexturePacker, which was quite a drama and ended up messing with my tiles badly. One of the biggest issues was that there was no way to organize my tiles so that certain textures consisting of 3x3 tiles would be properly positioned so I could use them in Tiled. After several hours I gave up on this and decided to do the edges manually using an image editor.

After adding the border manually I actually had to redo some tiles in my Tiled map due to it all being shifted a few pixels, but luckily I found that I could just alter the .TMX file so that was all set. Testing this didn't solve anything, those ugly lines were still present. I then realized that the filter I was looking for was probably at the same location where I set different parameters for the TmxMapLoader, duh. Yep, there they were: Parameters.TextureMinFilter and Parameters.TextureMagFilter. I changed both these to "TextureFilter.Nearest". Unfortunately this did not solve the problem either.

The final option was to repeat the outer pixels of the tiles. I did this manually (luckily I was able to do entire columns and rows at once) and ended up testing it again. Thank god, it worked!

Also, note to self: TileAtlas is deprecated.

In the next few hours I will take another looking at how I am going to draw my trees, as they have to be interacted with. For now, take a look at how it currently looks:

The world

comments powered by Disqus