Game runs rather slow...

Having an issue with game running rather slowly. There are quite a few objects and some have a fair amount of verticies. My system isn’t dated either, it’s a quad core 2.6ghz i5 with a Radeon HD 5700 and 4 gigs of ram…I didn’t figure it would run this slow however. This is more of an interactive tutorial more then a game so it doesn’t need to be flashy. I’m still kinda new to blender and I was just curious if there were any ways to make this run a little faster other then going back and re-drawing some of these objects to use fewer verticies. Also every object has a script to change its color on mouse over. I’m basically just looking for some suggestions as how to tweek for the fastest performance. Willing to sacrafice shades/lighting effects things of that matter…anyone have any suggestions?

Edit
Verticies: 52778
Faces: 56399

Should that many verticies drastically effect performance?

Hm… How many fps is it running at? Are you using a lot of physics/collision enabled objects? Too much physics calculation is a big slowdown in my experience.

It runs at a solid 60fps until a mouseover event. Then it drops as low as 1.4fps whenever you mouseover an object. Every object has a mouseover event tied to it along with a script to change the object’s color. The best way to describe it would be an ammo crate. Lets say you have a crate thats 4 foot by 4 foot that’s filled with different types of shell casings. I’m trying to remove the different casings from the crate.(mouseover and left mouse click sensors tied to an edit object event to end object). That’s basically what I got going on.

If you have the renderer set to “Blender Game”, you can enable the profiler. This can be done through the game menu on the info header, or under display in the render options. This could help give you some idea of where the bottleneck might be.

I would think 60k polygons is fine.

[edit]
Looks like you found the bottleneck then. There have been some other reports lately of mouseover scripts being slow.

Is the mesh with the mouse over relatively complex? If so, try a simpler physics shape, or use a physics proxy of some sort. While I’m not 100% certain about this, I think the mouse over sensor is handled with raycasting through Bullet. So, if Bullet is having a hard time with the physics shape, then I think the mouse over sensor will too.

Took a break from the project for a little while and now I’m back at it. I started creating lower poly models to use as collision bounds for the high poly models. Something crude to make invisible that will tell the actual high poly model what to do whenever the mouse is over it without actually giving the models mouseover events. Like a relay…One problem i have come across however is that whenever i have a couple high poly models in the scene and i have the mouse over them, even without the models having any mouseover events my frame rate will still drop to about 3-4 fps! As soon as the mouse is off the object it goes back to 60fps instantaneously however. Its no where near as bad as it was but still not right. I’m going to go back through some other scripts that some other models are using and make sure there’s nothing in theme that’s checking other objects or what not on mouseover…anyone have any other ideas?

Set the high-poly meshes to no collision, or box/sphere if you’re not using the low-poly collision meshes. It uses collision detection for mouse-over, and defaults to triangle mesh, so 50,000 polys will make it cry.

Better set the faces highpoly mesh to no collsion. This way they will be ignored for collisions and rays.
Then add a lowpoly mesh set to invisible, that can be detected by a ray (working as collision box).

For a mouse over it should not be necessary to detect a high poly mesh.

How do I make it to where whenever the low poly mesh has a mouseover event, the effects carry over to the high poly mesh? Say i have a script that changes the color of an object and wanted it to run and take effect on the high poly mesh whenever the low poly mesh is moused over?