Small gaps in Tiled sprites

Anything libgdx related goes here!

Small gaps in Tiled sprites

Postby joebrothehobo » Mon Jan 14, 2019 1:21 am

Hello - when my character moves around, sometimes there is a small gap where my tiled sprites are. This doesn't happen if my character is standing still. My guess is it's some sort of floating number precision error / scaling issue. Does anyone have any thoughts on this issue?

https://i.imgur.com/4E8E8Qx.png (how it should look)
https://i.imgur.com/gfDmSIc.png (how it looks with gap)
https://imgur.com/fSdnCb2 (small gif of it happening)
joebrothehobo
 
Posts: 2
Joined: Mon Jan 14, 2019 1:16 am

Re: Small gaps in Tiled sprites

Postby StarCloud » Mon Jan 14, 2019 5:42 pm

I have the same problem. Don't know whats wrong.
StarCloud
 
Posts: 21
Joined: Wed Oct 24, 2018 6:58 pm
Location: Tammisaari

Re: Small gaps in Tiled sprites

Postby joebrothehobo » Mon Jan 14, 2019 9:19 pm

This post ultimately led me to a solution after asking for help in the LibGDX discord.

https://www.badlogicgames.com/forum/vie ... 17&t=17497
joebrothehobo
 
Posts: 2
Joined: Mon Jan 14, 2019 1:16 am

Re: Small gaps in Tiled sprites

Postby QuiIIraven » Mon Jan 14, 2019 10:19 pm

no need for special codings

just pack your textures together in an atlas and use a padding of at least 4 with bleeding enabled and edge/duplicate padding enabled.

this solves it without touching the code
QuiIIraven
 
Posts: 32
Joined: Sat Jun 02, 2018 4:59 pm


Return to Libgdx

Who is online

Users browsing this forum: Google [Bot] and 1 guest