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

https://i.gyazo.com/2ca74bdbd793f7afb735157c1a0e1b9e.mp4

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

https://i.gyazo.com/b605339304fee6da7944fafcf4bd22dd.mp4

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

https://i.gyazo.com/45cde7bb6a8a5a823e72e67cf19c01f1.mp4

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.

https://i.gyazo.com/7c71a269acc1cd49d97fd709ac63c9ca.mp4

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

3 Likes

But do they really