I’m looking into optimizing the interface of my game. Currently, updating any element inside the single ScreenGui heavily lowers the framerate. This is especially noticeable when tweening the position of a GUI element.
Would it be more efficient to use a ScreenGui for each section of the interface so that the rendering is only updated for a section when its content changes?
If not, what can be done to optimize things other than reducing the usage of the TweenService?
I’m aware this is something I can try myself, but it’s a big task to take on at this stage in development so I’d like to hear developer feedback on this subject.
I’ve never really experienced FPS drops with the UI, unless when I used many Viewport Frames with moving parts in them.
As for optimizing them:
You can :Destroy() permanently unneeded ScreenGUIs and hide temporary unneeded ones (I think hiding would affect the performance in a good way, but don’t take my word on that).
If you really want to go that extra mile, you can avoid using images for buttons and instead use the normal rectangular ones. Loading and rendering images/textures also takes up memory, and increases CPU and GPU usage.
I am pretty sure that limiting the amount of scrips can decrease lag, ever so slightly. But that change is so, so small that it’s probably not worth it.
Using one UI with divided folders is imo the cleanest way to setup a UI. There are no performance differences that I know of it is just cleaner in studio.