I have done everything according to what i read in the Gamekit book My project is still too slow, it starts at 30fps and goes down as i add objects. I have animations, alpha but i need those. My question does size have anything to do with fps? When i first started using the GE i did not pay any attention to size, my ground is larger than the grid. Anything else i can do not covered in the gamekit2 book to increase speed let me know. thanks
By the way i am using 2.49 the amount of faces in my scene is ONLY 3237 facesof course i add objects when i run the program but in total i don’t think it comes close to 5000 faces. i know 2.5 is lots faster.
Yeah, turn on the ‘show profiler and fps’ and see what’s taking the most time. And then only when you know what’s slowing you down, can you optimize. Posting a blender file would be very helpful too (if you don’t mind)
If you have a low amount of polygons for each object, turn off ‘Display Lists’. That’ll lower the FPS if there are a lot of low-poly objects (although it can dramatically heighten the FPS of a game with high-poly objects displaying). Also, for my game, if you have the game screen taking up a large portion of the screen, then the FPS will drop (so it’s a graphics card problem, for me). Updating (or downgrading) the drivers can help if you have this issue with your game as well.
If the Fps is low it is mostly because of the physics and/or logic. If you have a lot of objects with many materials could also be the problem.
Or it could simple be because of the graphic card.
Then my game with thousands of objects runs with 30 - 50 Fps. I bought me Assains Creed and I can’t even play it at it runs below 3 FPS.:mad:
I can’t post a blend it’s way too big about 70 mg. When i compile it will be double that amount. Could that be the problem, the size of the file? I have display lists off. My old graphics card Nvidia 6800 broke a few months ago so i had another Nvidia 8400 Gs put in.with the latest drivers. I always have the framerate on I live and die by that. I tried deleting one object then starting the blend, then deleting another and so on with fps on. I found the main problem but can’t figure out why. In the center is a rock (93 polys) and the ground area which was really slowing the down the fps is only 20 polys That should not be that way. That must have something to do with it, the size. Why it so big?
Disable colisions on all polygons of all objects that are not ment to use collision detection,.
, it starts at 30fps and goes down as i add objects.
Are this objects attached to a Python script…if yes,what kind if script and what sensor activates it. If you are using Always sensor with active pulse mode 0…well, its a greatest frame killer.
I need collisions No, just using logic bricks. The odd thing is I downloaded the blend “smooth flying” in that scene there is over 122,000 faces and it plays at 60 fps on my system. Like i said i have clip alpha and alpha plus some animations that continue through out play.
You can set your objects to dynamic, static or other options. One of those options is “no-collision” Almost all your objects should be this type, with only bounding boxes for each object being dynamic or rigid body. Also don’t forget to set a bounds type for your objects.
For each object in your game you want the following heirachy:
> bounding box (set to dynamic or hard body, box or sphere type bounds)
>> skeleton (if you need it, set to no collision)
>>> textured mesh (set to no collision)
+>> any empties needed for adding special effects, rays etc (set to no collision)
You may have a ground plane, set it to static, triangle mesh type bounds. Trees and buildings should be a detail mesh (set to no collsion) with a bounding box set to box or cylinder bounds.
This will greatly improve the physics profile performance of your game.
If you want to improver rasterizer performance, use smaller textures (around 256x256 is ideal) and you may want to look at .dds textures as these can be processed and decompressed directly by your graphics card. Using JPGs or other compressed textures doesn’t actually improver performance much as these still have to be decompressed by the CPU before use.
Sometimes just one problem (like a single bounding box with no bounding type set) can “greatly” reduce performance.
Hunt it down and fix it before it kills your game and your enthusiasm for the BGE.
Smoking mirror i have done all of that already. the problem seems to be the textures. the ground and the rock in the center have another texture moving over them to simulate caustics. When i delete the ground and the rock in the center but leave everything else my blend starts at 60 fps, that has to be it. Here is some info on the texture i am using for the ground width 400 height 263 50.936 size on disk. I was going to post a screenshot like Joeman wants I think the texture info is a better, maybe the size of the texture is the problem
Thanks
digiman
Joeman, you are correct I changed the textures to a small one for a test and made No difference
haidme, The sensor is an always sensor, true selected and the f is set to 0 below is the script i use
A for loop running every frame? Could probably slow things down. How big is the variable array? It might help to remove the dot elements in the loop as they are function references that get re-evaluated every loop. For example:
getVert = mesh.getVertex()
for v in range(0,array):
vert = getVert(0,v)
...
A small speed up, but if array is big it can make a difference (I used this method on a path finding script where there are a lot of nodes to search through and actions applied, worked a treat).
And as haidme suggested, increase f on the always sensor.
I think this was asked before, but what does the Profiling say in the top left corner of the game screen? Is Logic high, or is it another aspect of the BGE?
Yeah, UV scroll always slows things down for me.
I’ve avoided it so far in favor of animated textures. It take a little more planning to make an animated texture, and of course the quality is much lower, but the speed increase is huge.
If you have a script which does a (for ob in range) loop on thousands of verts it’s going to really hit your performance, especially if you have v set to 0.
If you set v to 3, you shouldn’t see much difference in quality, but it should be much faster. Most movies run at around 24 frames per second.
60 ticks / 24 = 2.5
a v of 3 will give you similar to movie grade performance on any animation, with 1/3 of the performance hit.
If it still doesn’t look perfect, research how to make animated textures.
…and always use textures which are sized to a power of 2;
128128
256256
512512
10241024 (though this is overkill for BGE)
You can mix 128*512 but some older graphics cards may have trouble (new ones as far as I know are designed to deal with this).
Smokingmirror, I have it set to 3 . I fooled with some of your suggestions but no luck so far,look at the image of the readout, that framerate is how fast my blend starts.
It is rasterizer with 86%. So you have to look at the render output.
I do not think it is a problem of the UVscroll script (that would be logic), but you might temporary disable it.
I would point at the alpha. Alpha bypasses the normal render process and slows down a lot. The slowdown is more as larger the visible alpha faces.
Much better is clip alpha. Try to use this.