Blender game: To many objects lag.

Ok so I’m making a game in blender and when there are to many objects in the scene the framerate drops extremely rapidly. Now I’ve looked up threads on this before, but any info they have had is useless to me. My objects are all seperate enemies, as a result it’s not simply a matter of copying via alt+d. So I was wondering if there were some way I could improve preformance without lowering the number of objects.

A list of things that do not work:

Level of detail,

Occlusion culling,

Disabling shadows and lighting,

Alt+d copying,

lowering resolution,

Moved from “General Forums > Blender and CG Discussions” to “Game Engine > Game Engine Support and Discussion”

In the BGE, ALT+D doesn’t have the performance improvement that Blender rendering does. Don’t use it for those reasons.

You need to give us performance reports (e.g a screenshot of the profiler; menu::game->show framerate and profile), otherwise it could be anything. Also, your computer graphics, ram and CPU specs.

It’s going to be an hour or two before I can get on my computer and take a screenshot, but I have an eightcore processor and an Nvidia gtx 960,I typically have no problem running most games, averaging 60-120.

It’s going to be an hour or two before I can get on my computer and take a screenshot, but I have an eightcore processor and an Nvidia gtx 960,I typically have no problem running most games, averaging 60-120.


And again I have an eightcore processor and an Nvidia GTX 960

Hello? Anyone?

Read the profile: physics are at 89%. This means 89% of processing power is being spent by physics. Try use collision bounds were possible and also try make AI dynamic or character, not rigid body. Also any objects that are not colliding change to no collision.

Indeed you want 60 frames/s ~ 16ms for each frame.

Your physics setup lets the Physics engine eat 189ms. This is your biggest bottleneck.

Further down:

  • Your rendering eats ~ 6ms
  • Your logic eats ~ 10ms

these two aspects eat all the available processing time.

  • Your animation eats ~ 1.7 ms
  • Your scene graph processing eats ~ 1.6 ms

I think this is the result of:

  • too much heavy physics
  • too much objects
  • inefficient logic

The AI are using character collisions, all of physics portion is coming from the enemies, and collision bounds is enabled.

I know there are a lot of objects but I need every single one of them! Any other engine wouldn’t normally have a problem with this, so how do I keep my objects but maintain the framerate! Do I edit blenders code, is there something easier I can do? Just what do I do!?!?

You have the symptoms of a permanent collisions.
Unless you’re doing some sort of hard core physic simulation - like fluids - the time spent on physics should be negligible, always.
Even if you have lots of dynamic objects.
A permanent collision is when a dynamic object is forced (usually by a parent-child relationship) to intersect the boundaries of another static or dynamic object.
The physics engine tries to move it away, the engine puts it back where it started and the cpu wastes time.
It is not a bug, just something that you have to be careful to avoid when you design your models and you bind them together as parents to children.
Check your models to see if there is any static-dynamic or dynamic-dynamic intersection among objects that belong to the same scenegraph branch (for exmaple, A is a child of B, B is dynamic, A is static and in permanent collision with B: if so, make A non collidable).

Thank you! The game now runs flawlessly with quadruple the enemies! (I haven’t tried higher than that) but thank you.