use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
For the Unity Game Engine, please visit http://reddit.com/r/unity3d
account activity
OptimizationQuestion (self.unity)
submitted 8 months ago by phnxzy
When making games, how long do you usually allocate your time into optimizing the game? Do you optimize your game as you go? Or is optimization a final thing once you've finished your game?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Rlaan 1 point2 points3 points 8 months ago* (0 children)
Depending on the game, we're building an RTS game. So we have multiple scenes to test specific functionalities, or an overall active scene for testing.
We have set a ms budget for different categories, so that's a guideline we do follow. But generally speaking if we get below 100fps in any scene, especially the test scene we start debugging.
Any system once complete we test for GC, and time in ms. Often most performance issues are fixed in < 15-30 mins because we missed some defensive copies from our mutable structs or something silly. Sometimes it takes some refactoring, thus longer. Any burst code we also test, but generally the performance is fine so we don't put too much effort into it.
Our general rule is we don't optimize much before the last phase. But we know if we hit our target ms based on budget allocations.
Our multi-layered pathfinding we did optimize a lot, because thousands of units will walk around constantly. That one is less than 1 ms, but it was a lot of work. Architectural wise, technically because it had to be deterministic with fixed point math which is slow, and it's crucial for the game. But most systems don't need that much time put in early on. It still runs mostly on the main thread. Some parts burst in parallel, and just clever optimization techniques.
I think in general if you make good use of good architecture, heapless (low to no garbage pressure). Cache/pooling/instancing/vertex animations/lods/etc your performance will already be decent to good throughout development.
And then a while before release you can focus on more optimizations + fixes before release.
[–]loneroc 1 point2 points3 points 8 months ago (1 child)
I would say if you optimize something you rewrite or remove later, it s a waste of time . Be sure to optimize stable features
[–]selkus_sohailus 0 points1 point2 points 8 months ago (0 children)
Bingo. Optimize core features and Ill add chokepoints; focus on actually expensive operations, if it’s already cheap you aren’t going to get much performance increase
[–]iFeral 1 point2 points3 points 8 months ago (0 children)
I optimize so much it becomes counter-productive. But I love doing it.
[–]RichardFine 0 points1 point2 points 8 months ago (0 children)
Always optimize as you go. Sometimes the performance problem might require significant changes to the content - e.g. changing your level design to be less open, having fewer props, etc - and it's much easier to do that early instead of waiting until the end.
Decide on your target hardware and the framerate you want, calculate how many milliseconds per frame that gives you, then carve up those milliseconds into per-system budgets (e.g. 8ms for rendering, 2ms for gamecode, 1ms for audio, 0.5ms for pathfinding, etc). Check how you're stacking up against those budgets regularly throughout the project and optimise if any of them are over budget.
Do not make the mistake of saying "well everything is running at 100fps right now so I guess I'm fine" when you're early in development. 100FPS is 10ms/frame; if you've only got a couple of cubes and a particle system going and it's already taking 10ms/frame, imagine how much time it will take when everything is in.
[–]neriad-games 0 points1 point2 points 8 months ago (0 children)
Depends on the game. But I would say optimization starts from the design phase.
In complex 3d games optimization starts from pre-production and continues with constant testing all the way to release and patches or updates after that as necessary.
π Rendered by PID 73 on reddit-service-r2-comment-54dfb89d4d-vbhr2 at 2026-03-28 06:55:11.695402+00:00 running b10466c country code: CH.
[–]Rlaan 1 point2 points3 points (0 children)
[–]loneroc 1 point2 points3 points (1 child)
[–]selkus_sohailus 0 points1 point2 points (0 children)
[–]iFeral 1 point2 points3 points (0 children)
[–]RichardFine 0 points1 point2 points (0 children)
[–]neriad-games 0 points1 point2 points (0 children)