I’m making a game that requires tens of thousands of parts on the screen, but it understandably lags a lot. Is there any ways I could optimize while keeping those parts as existing objects?
How many of these parts are visible? If some parts are not visible to the player then they can just be removed. You could also attempt to unrender all the minor details when the player is at a distance. If you are using unions you are going to want to convert them to mesh’s and use the performance option(this slowly deforms the mesh as you get further away and reduces the triangle amount.
I’m making a large amount of dots that create an image when shown from the right angle, but they start lagging whenever i try making it higher detail. I can’t really do anything like that cause its being dynamically created unless theres some method i dont know about.
They’re on screen so I dont believe that would work sadly. It helps when I’m looking away from the objects but sometimes that’s unavoidable.
Is it like a wall of Parts at the same distance, or parts at many different distances?
Parts at different distances can be removed using StreamingEnabled to help with lag.
Here’s another thing to try. Turn off the CanTouch and CanQuery properties of the Parts to see if that helps with lag.
They’re at different distances so that could work! Do you know a good place to look into using StreamingEnabled? Also I’ll try turning off CanTouch and CanQuery cause that could definitely cause issues
Disable: CanTouch, CanQuery, CanCollide, CastShadow.
Make the parts have SmoothPlastic as a material.
You could also benefit from Voxel lighting and of course StreamingEnabled.
This may be old information, but you should definitely give it a try if you’re into tinkering with weird methods: Give the parts Neon material but make their color black (or grey) to the point where they have no glow. Supposedly it’s faster than SmoothPlastic, but I’ve never tested it myself.
Would having bloom all the way down so neon doesn’t glow work? cause I need it to preserve the color of the parts. Also I’ll do all this and see how much it helps! Also also I realized I cannot have canCollide off as it’s another way of saving on part count by not letting parts overlap.
Yes that could help. You could look at some of these micro-optimizations, they may be helpful. It also has a bulletin about what to do with Bloom.
This helped a lot! It actually also helped me realize a massive lag causer in my code cause I was using a for loop to check if any of the parts a new part was touching was in a folder to delete it to save on part count but removing it made some of the big lag spikes go away completely! Thanks a bunch!
If you want to look up any Studio item go to create.roblox.com and Search there.
You’ll find links like the one I already gave above. It also describes the Properties of the items.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.