- Home /
Optimize game for beginner understanding
Hi. As first I want to say that I'm using Unity 5.3. I started in this program about week or two ago so I'm not such as expert and I was looking for how to optimize game but it's kinda hard for me, as begginer and total noob in this stuff, to understand it and make it good. I'm getting big frame drops like for 5 - 15 fps, even when I'm looking there where is the most stuff from so far. There are water4advanced (4x), several dozen trees and about 70/80 particle (they are soo far from this place when I see on this all and frame drops are for 5 - 15 fps so as I think, at least I, that I think they are not so big problem with frame drops as they are so many but I guess they are too far to make these troubles etc.), and others of course but others are normal objects which shouldn't be much as problems with it. As next one is that I'm using for this game FPS controller from import package from Unity.
I do really please in helping me in optimize it as it's impossible to play in 5 - 15 fps to get fun. As second I need as easy explaination as it's possible 'cuase as I said I'm begginer and I would not understand something, but let's try.
Oh man, I would read it soo long and I don't have especially time for it. Next thing is that I saw many words there which I couldn't understand because I'm not from England, USA etc. and just dictionary doesn't make understanding these words completly for me. Could you epitomize this as shortly as possible including as best as it's possible? Or in other way - just link me video which makes this what I would do need with it. I know that I could find them but I don't know this function at all, first heard and I don't know if I would find something what I can do with it but it doesn't help me, then you know :) It can be like that or it won't but I want to make surely myself, though :)
Answer by tanoshimi · May 18, 2016 at 06:05 AM
The processes in your game run in a pipeline: User input is captured, processed, physics and other internal processes are calculated, and then graphics are pushed to the GPU for rendering on the screen. The performance of your game is limited by the slowest point in this pipeline - the bottleneck that is holding up the rate at which data can be pushed through.
Therefore the first stage in optimisation is always identifying what part of your game is causing the bottleneck. We don't know that, but you do - using the profiler: https://unity3d.com/learn/tutorials/modules/intermediate/editor/intro-to-profiler
Find out what's taking the largest amount of time per frame, and optimise that.
Thanks for answer and letting me know. I've checked this and I noticed 2 things which took the most. I made 4x water4 because on the ground of water I made some concave places so I've put water there. Now I deleted them and there is only this general water. The heighest. Next and lastly thing was just my FPS controller. Fortunately about particles - they took up to 6% CPU only so i don't need do many with it.
And what's now? Now this same place where I was gettin 5 - 15 fps now I'm getting a little bit over 20 fps. But I think it needs more, at least 30. Take a look from random moment what takes CPU and if you can then please tell me what can I do to upgrade it at least to get in this place at least this 30 fps. I noticed 20 fps makes game slower for example what I was falling down from an object so it makes confusing.
Here is link to picture: https://zapodaj.net/7f13a43117bde.png.html
At a glance, the screenshot suggests that you simply have a complex scene. The particle system is the next-most complex part, at ~7% time spent.
Also, your framerate is always a whole number divided from 60 (generally), because Vertical Sync is turned on. If your framerate is less than 60, then it's 30. If it's less than 30, it's 20, then 15, 10, etc.
60/2 = 30
60/3 = 20
60/4 = 15
60/6 = 10
That is the Gfx.WaitForPresent part of the rendering, so that's basically irrelevant as well.
Almost nothing is used on scripts. Therefore, all of the performance matters lie in the scene's complexity (Camera.Render). It's hard to know exactly what would need to be changed without any images or examples, though. It could be meshes with high polygon counts. It could be an extremely large quantity of objects. It could be many things, but it's hard to know for sure.
Almost nothing is used on scripts because I wasn't writing them almost at all. This is not final product. I've done all terrain which I wanted to make some time ago but I noticed these huge framedrops so I have to fix it to get better in this. I wrote scripts for 6 ladders (one script for 6 ladders, I mean) and added climbing in script fps controller and several dozen lines for collectibles but I didn't finish it yet. All in all there won't be many scripts and other stuff in this project soon, so there is nothing to worry about more, I think.
I have put 2 terrains but in one terrain is almost twice smaller and there are just about 10 things and I have from 70 up to even kinda over 90 frames there. But if I turn around to this first terrain where is possible to see this all stuff like water, trees, particle system and so on then it makes that low amount of frames and it even doesn't need statics to see that as player is walking and "working" slower, what will be so bad for player which has restricted time to collect these collectibles in time which I will choose.
I don't know but my personaly thing, about quantity of objects - there is no so that many objects in here. On my eye there is less than 50 objects on all map. I mean normal objects like houses, bridges, ladders, dinosaurs and others. Including this maybe I have in these places that low amount of frames because I have too bad graphic card? I have it from intel core i3-6100 so there is nothing special. I'm playing games on console so I didn't need to buy normal graphic card as it hold out for me. Although let's take a look on my specs:
Your answer
Follow this Question
Related Questions
getting udp package info inside unity (GlovePIE) 0 Answers
good guidelines for iOS Profiler 1 Answer
Make a light and fast game 1 Answer
Unity lags with high Tree count 1 Answer
Lots of Fixed Joints 0 Answers