ImageLabels/buttons flickering upon image update

I’m updating the gui every 1/12th of a second, and it’s flickering like this. Even if I lower the speed (Let’s say 1/5th of a second), it still flickers white.

I am currently using imagerectoffset, but even without imgrectoffset/imagerectsize, it still flickers white when I update the image.

Really annoying behavior, as I’m attempting to make animated gifs with sprite sheets.

2 Likes

I haven’t see this behavior. Are you sure your code isn’t to blame, by selecting an invalid empty region of your sprite-sheet as the sub-rect?

I think it’s your code
I ran into the same issue with my spritesheet but I realized it was my code that was causing the problem

I just subtracted the row and column values by 1

Here is one of the sprite sheets:

The maximum size for the entire spritesheet is 984x816, each image is 328x272 pixels in size.

ImageRectSize is currently set at 328x272.

The ImageRectOffset is determined by the script (Maximum of 2328 on the x, and 2272 on the y axis.

When I printed the output for the x/y offset, this was the result:

0,0
328,0
656,0
0,272
328,272
656,272
0,544
328,544
656,544

After seeing where the problem starts, it appears as if it starts around image 8, and that’s when the flickering starts to happen - is it possible that Roblox corrupted the image on accident?

Also, here’s the place if that’s any help:
https://drive.google.com/file/d/0B_F_7kaTB5c7WE5uRENkRVRhLWM/edit?usp=sharing

The problem is that you’re using so many large images that the ContentProvider is deciding to kick some of them out texture memory while you don’t have any ImageGuis referencing them, so they have to be loaded back into it again when you get back to them, and you see the flicker.

To fix it either you can use less images, or keep 1x1 pixel ImageGuis onscreen for each image to keep them in texture memory.

3 Likes

[quote] The problem is that you’re using so many large images that the ContentProvider is deciding to kick some of them out texture memory while you don’t have any ImageGuis referencing them, so they have to be loaded back into it again when you get back to them, and you see the flicker.

To fix it either you can use less images, or keep 1x1 pixel ImageGuis onscreen for each image to keep them in texture memory. [/quote]

This actually makes sense, thanks so much!

2 Likes