Tile Rendering Error-TrunkDev

Create issue
Issue #55 open
Former user created an issue

I have been experimenting with the TrunkDev branch to make a top down RPG game and I have come across an issue with the layering that causes the layers to leak into one another a bit and have pixel gaps. It happens in both the scene and game view and I think it is because of the use of the mesh renderer and layering on the Z axis. I am not sure but maybe it would be a good idea to switch to using the sprite renderer and sorting layers if possible. Attached is a screenshot of the bug. Cheers!

Comments (6)

  1. Jean-Philippe Rivard

    I have to be honest here, I was surprised by X-UniTMX.

    Happily surprised with my first attempt, using the Unity2D branch, everything is working nicely. And horribly surprised when I started using the trunkDev branch with the problem mentioned before.

    I did everything I could understand from the other issue and the issue remain. Would it be possible to polish the Wiki with a full steps demonstration on how we should set up a project for it to work with this issue? Out of the box, every one is bound to have it. And saying to rely on your file just won't make it. All of us don't really know that specific part of Unity, what's causing it and how to fix it.

  2. Guilherme Augusto Almeida Filo Maia repo owner

    I'm really sorry for that, since this bug has appeared I wasn't able to correctly fix it, and it's one of the reasons I've yet to merge trunkDev into Unity2D.

    Currently I don't have much time to invest in this project, so I update it infrequently... I have planned to make a proper guide, and I will as soon as trunkDev has the features and fixes planned for v2.

    Meanwhile, you can choose which branch better suits your needs, the only problem with the upgrade to Unity 5 for the Unity2D branch is the AddComponent property, but if you do not use it, you should be fine.

    I'm really sorry for not being able to tackle this issue right now, but I will as soon as I'm able to work on it.

  3. Nitneroc

    Salut Jean-Philippe !

    I suffered from this problem too, and as you can see in that other issue, managed to fix it on my side. I'll write something on the wiki about this whenever I have enough time, but meanwhile I could give you some pointers :

    • Adding spacing and margin to the tileset helped a lot, doing this by hand is probably really tedious, I found this Gimp script :http://registry.gimp.org/node/24816 It's far from perfect in my opinion (you have to calculate and set canvas and layer boundaries by yourself), but it will add spacing and margin, and will fill those with bordering pixels.

    • In xUniTMX properties, 0.01 correction gave best results

    • make sure camera's size is setup correctly :

    ortographicSize = Screen.height / 2.0f / PixelsPerUnit / Scale;
    

    The last thing that made it look perfect for me was having the camera move 1 pixel at a time, and have it at the middle of a pixel (moving from 0.5 to 1.5). good luck !

  4. Jose Antonio Andujar Clavell

    I'm having the same problem with Unity2D branch and trunkdev, but after a few investigation, I saw that the 2D platformer demo works fine meanwhile the tilecollider demo doen't work fine.

  5. Log in to comment