Bool Frame.AllowPixelSpllitting

As a Roblox developer, it is currently impossible to make guis move smoothly.

This generally isn’t a problem either because the gui is moving too quickly or at too high of a scale to notice, but when trying to tween guis at small scales, especially for subtle effects, it can get really ugly as it becomes obvious that the gui is jumping from one pixel to the next.

I want to be able to size and position guis with accuracy greater than 1 pixel. The property would simply block the gui from automatically rounding the size and position offsets.

41 Likes

When my UI scales it does this

Right now in roblox it is impossible to smooth this movement.

7 Likes

The UDim offsets are rounded because they aren’t stored as floats, and shouldn’t need to be. The only case where non-integer positions could be meaningful is for phones/tablets, when a smaller resolution is used for performance. I think your case might be caused by UDim scales being inconsistently rounded after being multiplied by the parent frame’s size/position.
I run into similar problems when using UDim2.Scale to position and size things:

I could probably solve it by setting the size/position offset from lua using math.floor/math.ceil to line up the pixels exactly, otherwise it doesn’t know whether rounding up or down will cause it to line up with other guis.

Edit: Fixed dead gyazo link

Another example. :frowning:

Poor gif quality but you can still see the jittering. Just imagine how bad it would be if the gif wasn’t blurry.

1 Like

This time it’s in a BillboardGui. No code is running, this is just how BillboardGuis look.

5 Likes

I ran into this problem when I tried making a circular health bar. I placed the guis in the mathematically correct positions, but the health bar had gaps and jagged parts popping out. I threw that code away, but the same problem can be seen in Cannoneers’ tutorial:

I think Frame.SnapToPixel would be a more intuitive property name.

3 Likes

Just realized nametags in Team Create have pixel splitting behavior.

It looks so clean and smooth. If only we had an API for it.

3 Likes

But do they really