Surface GUIs laggy on Desktop, but Not on Mobile

  1. What do you want to achieve? Keep it simple and clear!
    I want to be able to render ~8000 image labels on-screen at once on my game as an alternative to viewportframes. Currently it works perfectly, but the performance isn’t as great when I have too many of them.

  2. What is the issue? Include screenshots / videos if possible!
    The stress testing place runs absolutely horrid when the images are loaded in on a desktop computer. Even on an RTX 4070 Super, the game doesn’t even run at 60 FPS when the surfaces are all on-screen.
    But likely because of the way that Roblox has optimized the mobile client, when you run the stress test on mobile, you’re able to render all of the images at once whilst maintaining a smooth 60 FPS.


    This is the stress test running on an Iphone 13

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I’ve tried to lower the pixels per stud, disable lightinfluence, lower the resolution of the images and much more, but no matter what I do, the game runs perfectly on Mobile devices, but on a Desktop it just DIES, with the frame rate dropping to low 5-10 on my Lenovo Laptop and around 10-20 on my RTX 4070 Super.

The Place is uncopylocked here, there is a bug where the parallax code will error sometimes if you try to run the stress test before everything is loaded, so wait around 10-20 seconds.

What I was trying to achieve was a parallax window effect sorta similar to how the new Spiderman games render interiors that are actually just 2D Images.

I don’t know if Roblox is looking to improve the performance of the SurfaceGUI on desktop devices or if this is a bug or if I’m just doing something wrong.

1 Like

From what it looks like, its less an issue with the viewport frames, but more possibly just how Roblox handles instances, though I cannot say for sure because I’m not sure what your code looks like and what methods you’re using.
My guess is solely established on the fact that the lag only occurs when the inner images are moving, alongside the fact that the Roblox Instancing process is and always has been for me, quite funky.

There isn’t much realistically that you can do to fully stop this, I’m sure its just something with Mobile devices having crazy good optimization for things like the instance system, my suggestion would be to animate anything in primary view at full framerate with no hiding, and anything that is at a high angle and or at a distance greater than 100 studs, to reduce the framerate and darken/hide it as it gets further…

Also I think having 1000+ animated windows would be a bit excessive even for most AAA games. The systems in place are typically well optimized, and showing 100 windows at most, on the extreme ends, more than that and its not exactly viable, especially for the Roblox game engine. If say you’ve got a skyscraper and want to do entire floors visible, then you do the entire floor as one window.

Again, just optimize the crap out of it. Nothing much else you can do in the way of the Roblox Engine itself other than maybe making a request to the development team.

1 Like

Yes I’ve already added dynamic framerates and used parallel luau to prioritize images which are closer and more significant, but the problem isn’t to do with the code, as the game is still laggy even when the code isn’t running. I guess it’s just to do with how Roblox renders surface GUIs on desktop devices. I’d probably just have to take this up with Roblox and ask them to improve the desktop performance. :frowning_face:

To me it doesn’t appear to be solely a problem with the rendering pipeline. It leans more towards again, instancing, which isn’t at your fault at all.
Whenever you make a change to any property, or create a new instance, it takes a little bit of time, nothing major, but enough for when you do it across say, 1000+ instances like I have done in the past, it can add up, resulting in lag equivalent to what you’re experiencing, and majorly, especially since you’re going from LuaU > C++, and that then has alot more overhead and pipes to send stuff to, clogging up the limited usage. Tweening kind of helps in cases like these, but not much, and only sometimes.

Anyways, I wish you luck with your endeavors to the illustrious yet eerie “Roblox Feature Requests”, where all your hopes and wishes vanish in an instant…

Unless you get lucky, in which case, I envy your luck. And also say thank goodness because this issue has been around for ages.

I’m pretty sure it has to do with rendering though, as on desktop as soon as you look away from the wall of Surfaces the FPS rises back to normal. And even if the surfaces aren’t updated they will still tank the framerate. Oh boy, I hope Roblox does something about this, because it’s really annoying.

Thats fair, I thought the “Looking away and it stops” part was from an optimization by you, but if thats the case then yeah, probably something with rendering and updates in the Surfaces. Good luck man

1 Like

Yeah, even with the code disabled and the surface GUIs just being static it tanks the FPS and stops when you look away.

and I’ll need that luck :skull: :skull: