How to Speed Up Your World
Nine components cost the most performance, and a few small changes keep your world smooth even when it is full of objects and scripts.
Introduction
A world that lags is a world players leave. The first sign is usually small: the camera stutters when you turn, or a jump feels late. By the time players complain, the cause is almost always the same. Too many things are asking for work on every frame. The good news is that most of the fixes are small, and the editor already points at the worst offenders. These tips start with the nine components the editor itself warns you about, then move through particles, lights, physics, and sounds, and end with how to test so you know a fix actually worked. Performance problems usually come from too many active scripts and heavy effects running at once, not from one big mistake. Start by turning off scripts you are not using, then reduce effects before changing how your world is built.
Tips
Start with the nine components the editor warns you about: Vehicle, Boat, Follower, NPC Follower, Ray Caster, Glow, GlowAnim, Physics, and Detectable. The editor shows a warning on these that reads: This component has high performance consumption. Please use with caution. Use them only where they matter, and remove the ones you added just in case. Turn off Physics on objects that never move. Physics is one of the nine warned components. Select the object, find the Physics component, and switch off Is Active. An object with no working Physics component costs nothing in the physics engine, and a decoration that never moves does not need one. Lower Particle Quantity, and switch off particles you cannot see. A Particle has Quantity, Bursts, Bursts Interval, and Simulation Speed, plus an Is Active switch. A big Quantity with Bursts firing all the time adds up fast, so start by cutting the Quantity in half and see if anyone notices. If a particle effect sits behind a wall or under the floor, switch off Is Active. Remove Fake Light objects the player never sees. Fake Light comes as Fake Light Basic and Fake Light Render, and both have an Is Active switch. A light hidden behind a wall still costs performance, so delete it or switch it off. Keep the lights the player actually walks past. Hide whole groups with Is Active instead of deleting them. Group has an Is Active property, and a script can switch it with the Set command, the same way the Your First Script tutorial hides a bridge. Turn off a group of decorations the player cannot reach yet, and switch it back on when they get there. Turn off collision on decoration. Group has an Enable Collision property. A fence post, a rock, or a wall trim the player never touches does not need collision checks, so switch it off and keep collision only on the things the player walks on or bumps into. Slow down your spawners. A Prop Spawner has Quantity, Auto Respawn, and Cooldown. With Auto Respawn on and a short Cooldown, it keeps adding props forever. Raise the Cooldown, lower the Quantity, or turn off Auto Respawn when the area is already full. Keep the model count down. The editor warns that an excessive number of models may cause severe lag. Build with fewer, bigger pieces instead of stamping dozens of copies of the same small model, and reuse one model where you can. Give sounds a Max Distance, and do not leave Auto Play on. An Audio component has Max Distance, Min Distance, Spatial, Auto Play, Loop, and Is Active. A sound with no Max Distance keeps playing across the whole map, so set a Max Distance and let it stop when the player walks away. Turn off Auto Play on sounds that should only play when something happens. Keep the weather light. Weather is a world setting under Environment, and it runs on every frame. Pick a light Weather effect, or none at all, if your world is already heavy. Fog Distance decides how far the player can see, so pull it in on a big open map instead of letting the game draw everything far away. Test in Play mode with the FPS display on, one change at a time. Turn on the FPS display in the settings menu so you can see the number instead of guessing. Change one thing, press Play, watch the number, then change the next thing. If you change five things at once, you will never know which one helped.
Tip
Start with the nine warned components. They are the biggest single win, and the editor already points at them. Test in Play mode. That is where the game actually runs, so that is where lag shows up. If it still lags on a weak phone, lower the Graphic Quality in the settings menu. The game itself gives that advice on the loading screen. Do a final pass before you publish. Walk through the whole world in Play mode and watch the FPS number in every area, not only at the spawn point.