Physics taking up too much Resources

Okay, let me start by saying that I’m not a noob. I’ve been using Blender for 4 years, and the GE for 3. Sorry for asking a question that sounds newby lol.

I’ve been working on a game for our programming club at school. It is the first game I have done in GLSL, and I’m really serious about the game. I’ve been doing everything possible to optimize performance, but there’s a problem. From the start, I noticed that physics is using more resources than everything else, which never used to be the case in previous games I’ve made. Now, it’s becoming a problem because the game lags at times. (Physics is taking up 90 - 95% of resources).

I have the landscape with triangle mesh bounds. I’ve been using a margin of .001 for everything that has collisions. My player has a cyllinder with 8 sides, set to triangle mesh as his bounds. I have enabled “ghost” on every object that I can. I’ve noticed that if I disable the physics check box on the materials, the physics resources goes way down… (below 10%). But then there aren’t any collisions.

Does this mean that the materials are what’s causing the huge resource usage? Should I use separate collision objects without materials? I disabled friction on all of the materials, which helped a bit. This is kind of a big issue, because we’re really serious about this game, and we aren’t going to make it at the scale we want to if it lags because of physics.

  1. Can you tell whether it is a particular Object that has that high Physics Processing? (You can find that out by taking away particular Objects and see whether the Game will run faster or not.)
  2. Wherever you can, don’t set the Objects to Ghost but to NoCollision instead.
  3. You also can supend the Physics of Objects that are for example far away – it can help a Lot as well.

I never saw the “no collision” option. That might be helpful. And no, I don’t think it’s a single object, but the whole game in general. This happened after Blender 2.5+. I never had this problem with previous versions of Blender. It always used to be the graphics that slowed down my games.

So, could it be that the Physics Processing in 2.49 ran faster than in 2.5 ? This would be new to me, but if it was like that, it would be an important Thing for the Engine’s Performance Cleanups.

Well that’s part of the reason that I asked if it’s because of the materials. Ive always made games in TexFace mode. I never used materials, just assigned UV textures. Now I’m using GLSL. Each object has material(s). But it took me a while to realize that turning off friction under physics in the matierials settings helps quite a bit

A Question: How do you display the frame rate and resources my game is using ? (that is a noob question)

@ Ighazali: Usually atop the 3D View, it says File - Add - Game - Help. There you click Game > Show Framerate and Profile.