The second day started with Deep Impact: Optimizing Outer Wilds for a New Platform
The Unity team talked about how they helped port the game to Switch. The structure of the talk was less than ideal as they hardly shared any before-and-after comparisons using profilers, but it still contained a lot of useful tips. Since the game is now released on Switch, let’s assume everything worked well.
Main takeaways:
- Updated Unity to a newer version (questionable, but it helped them)
- Implemented a custom occlusion culling system tailored to their specific use case (this is a big takeaway, as Unity’s default systems are usually made to fit general needs, while a custom system can be designed to do exactly what's required, saving resources; of course, you have to profile and weigh the development and support costs against the potential benefits—no need to do it for things that aren't causing issues)
- Collider optimization: simpler mesh colliders and primitive colliders
- Combined small geometry in chunks of 64k vertices using jobs, and split large ones
- Swapped meshes for simpler ones when it wasn’t noticeable to the player
- Used LOD + HLOD
- Reduced vertex count without compromising quality
- Used fewer unique materials
- Enabled dynamic resolution
- Switched to Addressables instead of Resources
- Set asset loading priorities to load the most important assets first
- Replaced the standard shader
- Streamed textures and mipmaps
- Used burstable code
I’m also adding a picture with their takeaways. However, I slightly disagree: you should never optimize just because "it's almost always a good idea." Always profile first to ensure optimization is necessary, and then verify with the profiler after that the optimization was successful. Also, parallelization can bring great benefits, but not in all cases—synchronization can sometimes be even slower than the initial computation. That's why I love so much talks by Ian Dundore at Unite, because he also pushed that great idea.
So my conclusion would be:
Always profile, only you know your game and your particular case. Do optimizations according to that and verify every change.
Post #2434
630
- 👍 9
- 🔥 2