hi guys.
a newbie question here. i’ve created a terrain with 3 textures, painted quite a lot of trees and grass, and had a car (acquired in car tutorial found here) in the scene. when i play the scene (driving the car) i got the fps quite good (40~60FPS), but the main problem is i didn’t experience the smoothness of gameplay, i mean, there are quite few times my fps dropped to 3~4 and went up again to 50~60. the gameplay become lagged i got really frustrated. this is the first game i created and i really need help in acquiring a smooth gameplay. for now my scene still doesn’t have any shadows, (become worst when it does) and my draw calls when playing is between 300~600…since this is a forest scene i really need quite a lot of trees so reducing the numbers is a no though it helped. i want to add a lake and roads but i have to take care of this problem first. so i really need help from u guys to solve this. suggestions/tips are highly appreciated.
thank you very much
Had you check your codes? Check for any code that would affect the performance. Like too much use of code inside fixed update( loops).
i didn’t do any additional scripting. the only scripts i have are from the car tutorial for the car.
I couldn’t pinpoint where the problem is without seeing your codes. Im quite sure that might all happens inside a fixed update. Also, wheel collider is a bit expensive to use, so check your code. If there is nothing wrong with your codes because its from the tutorial, maybe there is something wrong with rendering.
Sounds like poor Design. You want to have a consistent/even amount of polygons in view at all times.
Going from hardly any trees to a million trees in view will kill the frame rate.
Check your camera and terrain/tree LOD settings, add fog/occulsion and other culling.
(Doubt its the wheel colliders unless you have 100s of them, and it wouldn’t dramatically increase/decrease framerate)
ok guys. i have removed the car for now and just using First Person Controller. the fps has improved a lot. but it’s still suffered from that lagging. the FPS is about 150~250 and there are times it dropped to 30~40 for some noticeable milliseconds. anyway i want to make a correction here that i used 13 textures and not just 3 (really sorry for the mistake)… i’ve already downed to 9 textures and couldn’t remove more for the looks i want to get.
@ callahan.44: added fog and improved fps. still suffered from that sudden fps drop. especially when i’m going to areas that got many trees.
if i really had to remove some numbers of trees, is there any trick to get that forest-with-so-many-trees feel effect? thanks.
i think you have some issues on draw calls. try to make all objects that doesn’t change it position set to static especially those trees
did that and thanks. there are some fps drops but not as much as before. i think this is acceptable… for now. i still haven’t apply lighting and shadows…