Upbge performance

Trying to procedural create a level with 11k static cubes but fps drops too much. Is it possible to run a game with thousands objects in a scene?

this heigh object count, performance UPBGE based frome 2.79 work good, but upbge its not unity or unreal engine i testing scene with 3500 objects, static and dynamic my fps equal 48-55 frame per seconds, in scene 3.5 million polygons not in frame in scene. You need cover because upbge not support more objects in scene or frame, need off physics for objects to long range, and use LOD system or use map or binary tree for add objects and remove objects in long distance. You need use in scene only nearest cubes no t add all level because fps fall down and add and remove cubes if player movement in scene

1 Like

I enabled object activity culling but still get low fps. LOD for cubes dont seem to be an option. So is not possible to make a minecraft like game in upbge?

You can join the object as a single mesh and get much better performance

I did a minecraft demo in geometry nodes before

What about geometry instancing?

it is possible to make minecraft in upbge, and even with a fairly good fps - the first thing you need is not to spawn a lot of cubes 1-2 thousand maximum, it’s quite simple that cubes are not used in pure form in minecraft, tile textures are used there - if you look at the addons to minecraft, you will see the principles of drawing such tiles. Secondly, you need to create a custom LOD system and at a certain distance disable the physics of such cubes and output them from the render, try suspendDynamics() to disable and calculate the physics of cubes restoreDynamics() for return collision and setVisible(true/false) to force output from the render, you can iterate through the for obj in scene.objects loop with several parameters such as the properties of objects estimate the distance to the object getDistnaceTo(obj) to determine if they are far from the active camera and whether they need to disconnect