A custom selection box using parts with Neon material requires only 2 draw calls:
1 for the base part
1 for the Neon material on the custom selection box parts
This high draw call count for selection boxes could impact performance, especially when multiple (around 50 at once) are used like in my case.
Selection boxes are great because they alow for quick addition of a clear point of interest
In my use case its to highlight buttons the player can step on.
Creating multiple different sized custom selection boxes for my use case is not realistic because of replication when constantly changing the transparency of hundreds of parts at once every few seconds
Here is my provided Test Place with my custom selection box (2 draw calls) and the default selection box (13 draw calls) SelectionBoxDifferences.rbxl (54.0 KB)
if there are any misunderstandings about how draw calls function please inform me!
Seems like a performance heavy oversight. Definitely worth fixing. I believe studio itself uses this object when re-sizing so definitely needs to be optimized.
Yep, studio does directly use the selection box, so selection box should be actively supported by the engine as I doubt they would purposefully use a unoptimized object in core gui.
but the other 2 selection objects are beyond broken. I am honestly surprised that selection box still works pretty well to this day. Sad that selection objects are treated this way. Making them with parts means more memory for physics properties when we just want to make an outline.
Surface Selection is also used in core gui when you apply a decal to a face of a part yet it is so broken, the transparency property doesn’t work and some other issues.
Unrelated, but you’re telling me the new CoreGui is built on old systems that have been left abandoned?
I wouldn’t be surprised if the CoreGui and TextChatService ran on wierd niche abandoned roblox things and if those things actually caused more performance loss than react
Either way, I feel like roblox engineers should be made aware of the fact that something which presumably isn’t deprecated is absolutely falling apart
Agreed, I wanted to believe it is deprecated but I checked and it’s not. The core gui does use select instances that are not being maintained for whatever reason. A bit odd… maybe they just don’t know but it’s been a long time since they broke and they still broken.
TextChatService is separate from this. In Studio, CoreGui is just another service for displaying things related to UI like StarterGui, and in this case it is not really relevant to the Roblox GUI of the Client. Studio probably uses these things because it’s always used them, and they try and port things 1:1 even across entirely new systems.
with 3 nearly full tycoons it was 1800 - 1900 draw calls when using roblox’s selection boxes
with 3 nearly full tycoons it was 900 - 1000 draw calls when using my own custom selection boxes.
This is nearly a 2x improvement in performance!!!
I would love to see roblox rework their selection boxes and surface selections since they are used ALL THE TIME when editing things in studio and in games.
I worry that a new developer will overuse selection boxes and surface selections not knowing how performance heavy they are and have a laggy game because of it.
SelectionBoxes actually appear to use a variable amount of draw calls depending on your distance to them. I discuss it a bit in my reply here but in some cases, SelectionBoxes don’t even increase the ‘scene’ draw call count at all and instead just directly increase the ‘total’ draw call amount!