- Home /
Low Fps in a simple game
Hi everybody, I'm a newbee in Unity 3d and I'm making a simple game. I'm gonna link you a video where I show you my game. It is made only by simple PRIMITIVES.. Cubes, Spheres etc.. And when I start it, it has got only 6 Fps ... The only "heavy" things in that game are those Leds you can see of differents colours (Green, White and Orange). They are a simple cilinders with a self-illuminated material (with Alpha to 50) and I attached the Glow effect to my main camera so every object with an Alpha different from 0 will glow. That's all. Nothing more. Do you think that the problem of my low fps is the size of my game? It's big.. if you see the range of my MainCamera you will notice that my map is a lot longer than the Camera's range. Indeed when I start the game I cannot see the end of the map. And there isn't any script with "while or for" cycle.. so this doesn't depend on scripts. What do you think about this? Sorry for my English and thank you all! Here it is the video:
http://www.youtube.com/watch?v=d2VjTxjh5-A
some more info: Main Thread. 206 ms Renderer: 4 ms Draw call:61 Saved by batching:586 Tris:87k Verts:160k Used Textures: 13 - 2.7MB Render Textures: 3 - 10.2 MB switches:5 Screen: 1382x910 - 14.4 MB VRAM usage: 24.6 MB to 26.6 MB (of 0.99 MB) VBO total: 676 - 2.0 MB Shadow Casters: 0 Visible skinned meshes: 0 Animation: 0
About my pc I have 4GB of Ram, an ATI HD 6870 and a Phenom II.. So it doesn't depend on my pc :S
At the end, this is what happen using the Profiler:
http://img607.imageshack.us/img607/6386/screenkdl.png
It seems that the "Others" is the problem but, how to fix it?
In your profiler, the ObjectCount in $$anonymous$$emory keeps on going up. Have you took a closer look at that?
Well, what should I do? I don't use particoular kind of objects. I just use primitives: Squares, Cube and so on.. It's really impossible that a game engine like Unity 3d can't handle that number of objects. I downloaded game with an incredible number of objects and the game runs smoothly..
@Henry90 how did you solved this issue? i am stuck in a similar issue.
@Razity I solved it after I understood that the problem was related to the particle effects I had in my game. In practice I had many particle effects which were "active" for the whole duration of the game. Even if you don't see them because they far from you, they are active! This leads to a huge use of resources. That's why my game was really slowly. Therefore I had to create scripts in order to "deactivate" these particles whenever they were not needed: for example when I was far enough and I couldn't see them. Hope this helps! ps: how did I notice that the problem was with the particle effects? I used a tool called "profiler" provided by Unity Pro (I don't know if the free unity gives it as well nowadays) which made me notice where there was an overload of resources in my game.
Answer by MountDoomTeam · Mar 07, 2013 at 11:35 AM
okay so it's definitely due to the lighting. something is happening with the processing of the lighting and the glow effect.
Unity says: The Bloom image effect gives greater control over the glow but has a bit higher processing overhead.
I think that glow effect is made for sparse usage example to make sunrays, to cover entire windows etc, you can read about in wiki. using that many of them is a bit cheeky!
What you should do is look for different unity shaders that has been written to glow, I have seen "planet shaders" which have that kind of effect, just look online for unity glowing shader. great level by the way.
feel free to vote if I answered it correctly and mark as answered
The problem is that I removed everything about the glow effect and lighting. And I didn't solve the problem. For this reason I didn't mark as answered :( Sorry!
Your answer
Follow this Question
Related Questions
Help! My game stutters and I don't know why 0 Answers
Converting to 3rd Person from 1st Person - Island Demo 1 Answer
Real elapsed time since frame begin 1 Answer
Lerping Field Of View is buggy 1 Answer
Set Max Rotation On Weapon Sway 0 Answers