¿How to speed up a simple game?

Hi, I´m on this work for my university. It´s thought to be part of an interactive installation.

I´m new in GE and don´t know Python lenguage, so i want to know if there´s a way to make the programing more efficient so the game could perform faster.

Thanks a lot, sorry for my english and it´s a pleasure being part of this comunity. From Uruguay, i send my fraternal greetings! :smiley:



7_Juego_Sem_Para_Mostrar.blend (971 KB)


You don’t actually have to type the upside down question mark in English. We’re pretty much slackers when it comes to textual/written communication compared to other languages.

That being said, you have all of your characters set up as soft bodies, adding a slight decrease in FPS, and I don’t see why they are complete softbody meshes. That’s usually something you want to do with certain parts of your characters, like a cloak or something, not something to do with a large character, and you don’t want them to melt, do you? If I remember right, Soft bodies are easier for the computer to calculate if the points are more evenly placed, unlike you’ll find on any full mesh of a bipedial character.

Although 817 faces per chacter is light, You did have a lot of quads (not too big a deal really, but…), and every character had a subsurf on.:no: It ran a lot faster when I removed or actually applied the subsurf, suprprise surprise. Your main problem is in having the computer calculate out the subsurf, and then having that calculate out the softbody, a two step and intensive process there. By just applying the subsurf and leaving the softbody I boosted from 10 to 30 fps, barely dipping below on my laptop, but it is a decent laptop. Which I also guess there’s a frame limit set to 30, because I enabled all frames and it goes up to near 56 tops, about 49 lows. I also deleted all the other characters and got about the same numbers.

Also, the mouse look and controls to the camera were really messed up on my computer.

You can see the frames per second (FPS) by clicking the game tab and selecting “Show framerate and profile”. That will help you later to see where you’re spending the most CPU power.

Before anything, thank you very much, Iconoclast.
About the question markers, I knew that, but I mistaken things. In fact in Spanish it´s a common thing to put only the upside up question mark as result of the English influence, I think, (although sometimes it´s not grammatically wrong to do it) but I usually try to preserve the both question marks because I like them. In this case, “I passed to the other side”.

Some questions, if you don´t mind:
1- Is there some reason in terms of speed, to prefer quads than triangle faces or it´s just a matter of vertex quantity?
2- I didn´t know that the mesh soft body was calculated in the GE, because I didn´t see it working and I putted when I was animating that characters just for a video. Can you use the “common”, or “outside logic panel” soft body in the GE?
3- Thanks a lot for the very good tips!!!

I will try applying the subsurf if you say that is faster or simpler to calculate.

A few things:

Softbody calculations are a) new and b) extremely complicated. Even my quad-core extreme edition processor has a hard time with a lot of them… and that’s for small objects. Consider the amount of math just to calculate normal 3-d objects… then multiply that by huuuuge numbers and consider that a computer can only do so many computations at once. Overall Message: don’t use Softbodies for things that don’t NEED the feature.

In terms of quads vs. triangles, graphics cards render everything in triangles, so what happens to quads it that they have to be converted into 2 triangles. This is, again, an extra step that the computer has to do, and thus will make it slower, especially for objects with LOTS of quads. Use tris.

Again, Subsurf ADDS more polygons. A lot of them. The more polygons you have, the more calculations the computer has to do to render them… etc etc. Once again, it’s usually NOT a good idea to have them. Instead, consider just using the set smooth option, or add detail to areas of your mesh that need detail. Characters in games like World of Warcraft are extremely low poly, but they are perfectly modeled and textured in a way that makes them look good.

Hope that helps!

  • use quads where possible, they are slightly faster since there are less elements in the game engines face list, and for drawing its slightly fewer openGL calls.
    It depends on the drawing method but generally for runtime and initial conversion quads should be a bit faster.
    Though it probably wont make a huge difference either and isn’t going to be a bottleneck.

Thank you very much.