How do I Indeed Optimize My Game?

Well, I’m on a project on BGE that is a terror game. Already made some elements like walls, doors, wardrobes, commodes, sofa and stuff.

The first thing that greatly optimizes my game is to remove all procedurally generated materials, putting flat images instead. Indeed it speeds the whole game up a lot, but I’m still on a non-desirable spot.

My textures on objects and floor have sizes of 512x512 or 1024x1024, nothing above that, there’s no material procedurally generated on the scene now, but I know I don’t know everything and that’s why I’m asking :smiley:

My problem now is with something called GPU Latency.

Here’s some questions:

Do I need a bump texture (purpleish) to optimize bumps on materials or I just need a black and white texture of type non-color connected to a bump node to get the job done?
If I set a Visibility actuator on every object scene to set they invisible and develop a script to hide them when they are off camera and show when they are not, will improve my FPS?
If there’s already a system that optimize showing objects, please tell me how to use it.

And so if you want to use relief textures, offsets, you need exactly black and white texture maps - which you connect through the bump and displacement node, but this will only concern the visualization of the texture on the object, this method will not displace the mesh vertices. The second question is yes, if you disable the visibility of an object at a certain distance, then rasterization will improve, fps will be increased because the render is not calculated for non-visible objects, but keep in mind that making an object not visible through the alpha channel and through obj.setVisible() are different things, the alpha channel will be calculated and there is no visibility through the settings.Also, do not forget to disable/enable physics for objects at a distance obj.suspendPhysics() obj.restorePhysics(), since physics will be calculated regardless of whether you have made the object invisible. As far as I know there is no system optimizing the visualization of objects - in any case, you will need to write it yourself. The only built-in optimization system of the type known to me in the blender is the levels of detail, but you can’t do 2-3 LODs for all objects, the levels of detail are done for actor objects, highly detailed objects, and there is no point in doing 2 levels of detail for the stool, since such extra LODs will only add size to the game

Sorry, I’m not sure how many things can cause “GPU Latency”, however, it may have little/nothing to do with optimization. For instance: I know that if you hook up a laptop with a small screen to a very large screen, GPU Latency will go through the roof. To fix this I need only scale down the 3D viewport to the screen size of the laptop and the game runs fine. In this case the GPU is simply trying to draw more pixels than it was made to handle.

Hope this is useful!

#1

#2

2 Likes

if you problem GPU Latency fall - use setup in game engine render icon - vsync - adaptive and use frame rate and assign animation frame rate more 24 frame per second -this create you GPU latency 1-2% rasterizer 10-15% and fps 55-60 frames, i test my project - space planets (450k polygons for one planet) and landscape objects, i use setup vsync-adaptive and i get 60 fps

I found a solution that is halve texture size and removing all procedural materials. 512x512 materials still looks good and increases the fps considerably to almost good rate.

Indeed, making these changes reduces GPU latency, after that, I’m looking for making a culling script myself into the scene.

If you’d like some more guides about how to improve BGE performance, here some decent ones:

Indeed, there’s no single best way to do it, but a group of changes that may help. Thanks to everyone for the help!