Create a field edge without holes

I’m trying to create a field edge. I made images of boundaries and everything works well with the test, but when I run on the phone with a different resolution, everything diverges and holes appear. I try to solve this for a few days - everything seems to look ugly.
image
I create them with go objects

Sometime I see this

image

Please advise what you can do to create a beautiful edge of the field!

I tried to make a texture “nearest” - it did’t help!

Try to add an extrude of 2 to the atlas these images are on.

Yes, this is the solution. You can read more about the different atlas options in the manual.

Side-note: This is a recurring problem new users run into and we have finally after much debate decided to change the default value of extrude borders from 0 to 2 when creating a new atlas.

9 Likes

Well, I’d say problem originates in camera position and I’ve run in this problem when tried several game engines. But it’s nice to see that Defold has workaround implemented in engine that other engines suggest to developers to do them selves.
I say it’s workaround because problem comes from camera position in decimal values and me being purist when working with pixel art I don’t want to see side of tile extends or shrinks out of it’s supposed proportions and get wavy look when you have camera follow in tweens (usually lerp).
My solution to it is round camera position to integer values and if game is scaled, then round to 1/scale_ratio.
I’d be floored if something like that was also implemented in Defold, making Defold only engine that has solutions for screen tearing out of the box.
If you have HD resolution game then tile extrude is more than enough.