How can I optimize BGE 2.79?

I am trying to make a fighting game in BGE 2.79, I really like UPBGE 0.2.4, since I started using it, I fell in love with it, but I would like to try to do something more cute in BGE 2.79.
Starting with optimization. UPBGE 0.2.4 provides tray optimization, while BGE 2.79 does not, and if you don’t find a way to optimize the game, it will get heavy and it will be bad for gameplay.
first of all, it would be good for him not to render what I don’t see, as something behind the camera. Frustum Culling
Second, it would be nice not to render something through walls, but in a lighter way than Occluder-type physics! Occluder
And thirdly, to blur things that are very far away. Lod Bias
Maybe blurring things that are too close is nice too. :thinking:
How can I do this?

Have a look into Cotaks resources:

1 Like

already is, only things in the viewport get’s rendered

hmm lighter? occluders are meant to make things behind it lighter

a DOF filter could be of use, but then again a filter also uses up performance

In short lod is best, then occluders. depending on the situation i would use both. Another way is to only load in objects/buildings you need. so no lod but libload.

and ofcourse lower the textures size, reduce the amount of materials/textures, use an atlas map instead of 50 textures etc. There are really a lot of ways to increase performance.

But is there a way to do a Frustum Culling in BGE 2.79?

It’s automatically turned on in BGE 2.79 versions.
You can toggle it on/off with Python code.


Warning: this function will only available for a camera object.

1 Like

can you send a blend file?

Sure, here you go.
When you run the game player, you should get a printed True then printed False in the system-console.

This script is in the blend file put I’m pasting it here in-case anyone is curious.

from bge import logic

def main():
    cont = logic.getCurrentController()
    own = cont.owner
    own.frustum_culling = False #Usually is automatically set to True.

Toggle_Frustum_Culling.blend (90.0 KB)

1 Like

Thank you very much

1 Like