- Home /
Simple game jittering horribly on MacBook Pro.
I am currently developing an RPG on unity on my 2018 Macbook Pro. Right now the scene is extremely simple and yet I am still getting jittering both in the editor and even worse on build. I have followed many tips on how to optimize the game(for instance setting objects to static), but I feel as though there is something big that I am missing. I have attached a video. I would really appreciate any help for I have been experiencing hours and hours of frustration. It is making it impossible to develop even slightly complex scenes.
Are you possibly printing stuff with Debug.Log every frame? That's very costly. Also, have you setup your scene's lighting? Light probes, reflection probes, baked/indirect lighting? https://docs.unity3d.com/$$anonymous$$anual/BestPractice$$anonymous$$akingBelievableVisuals6.html
Alternatively, DO NOT mark objects as static that are not, in fact, static. Trying to make characters or any moving objects static will incur a heavy performance cost if the object actually moves in the scene.
Hi! Thanks for the reply. I will turn off all lighting just to see if that is my problem. I did not know the thing about static objects ! I will look into that. I don't think I am Console logging anything. Let me do some tests and report back.
Answer by Noblauch · May 04, 2020 at 07:04 PM
Hm, there is a lot that can slow a game down. I had once extreme problems with those sprite grass objects. Try to turn them off and see if it makes any difference. Otherwise the correct way to figure out whats wrong check out the Profiler and profile your game. See what may cause spikes in performance: https://docs.unity3d.com/Manual/Profiler.html
Profiler is indeed a powerful tool but requires some familiarity with the engine before you can use it effectively. Going through often-overlooked stuff such as dynamic/static lighting setups and the like may help with the next question being "Why is GFX WaitForPresent taking so long?"
Both of your guys suggestions helped a lot! The marking moving objects as static seemed to be the big thing I was missing. Same with the grass. I really appreciate it! I would still love any more performance advice though. It definitely couldn't hurt! And ya I have tried to use the profiler but it was a bit much for me to understand at this point.
One more idea - make sure not to use $$anonymous$$SAA, it's very GPU intensive and $$anonymous$$acs generally do not have top tier GPUs, but have incredible screen resolutions (Retina displays).
After that:
$$anonymous$$ake sure you understand the rendering pipeline you are using. If you are using Forward, Deferred, Universal or HDRP, read up on what makes it different from the others and what you should, and should not do in each of them.
$$anonymous$$ake sure you understand the lighting and shadowing and how it works in the game, what does it mean for a light to cast shadows, and how to control shadow and light quality in the project settings.
Be $$anonymous$$dful of what kind of materials you are using, where and for what. Also, when you get to it, make sure you understand how different post processing options work (bloom, ambient occlusion, temporal antialiasing), and how expensive/desireable they are.