Speed and how to get it?

Blitz3D Forums/Blitz3D Beginners Area/Speed and how to get it?

Pete Carter(Posted 2008) [#1]
not the drug! What really slows blitz down, ive put so much in my project that its hard to say whats slowing it down on low spec systems.

I know high surface counts have an effect what else should i be checking.

my project has split screen which is fine on my main machine but slow on my low spec system. I know this is normal but it seams like it maybe something else im doing wrong.

im using jv_ode but ive tryed simulations with much more going on and it showed no signs of stress.

any pointers would be great.

Pete


Abomination(Posted 2008) [#2]
I know high surface counts have an effect

But would a singlesurface in all cases be faster then multiple?
And would (let's say) 32 surfaces be 8 times slower then just 4?
cheers.


Jasu(Posted 2008) [#3]
Add some time counters to find out yourself.



This way you can see where's the bottleneck. You can go further and add more counters inside the functions if you need to.
Ways to optimize code have been discussed very much on these forums. Use search.


Ross C(Posted 2008) [#4]
Overdraw: This will kill your framerate if you are using alot of alphaed surfaces/particles, as each alpha pixel will have to be blended with whats on the z-buffer. So, keep that low or to a small area of the screen if possible.

Animation: Using boned animation in blitz is fairly slow. The more bones you have and the more bones per vertex, the slower things will be, as it's all done by the CPU, instead of the GPU.

Mixing 2d with 3d command: This can cause a big slowdown, depending on your hardware, so avoid if you can.

The Text command: probably partly to do with the above, but this seems to be the slowest 2d command and cause major problems on some systems.

To many polygons or high res texture: This is dependant on your GPU's fill rate.


Pete Carter(Posted 2008) [#5]
I have no boned animated meshes its a racing game.
i have info using text that i can toggle on and off so i can see that effect.

I may have too many high res textures?
Polygon count doesn't seam to matter that much ive seen some really highres meshes flying around in blitz even on rubish cards. anyway mine are all quite low res.

Thanks Jasu i hadnt thought of doing counters like that, it will help.

Pete


Ross C(Posted 2008) [#6]
Try rendering your scene without textures, or creating a bunch of lower res textures.

What size of textures are you using? And how many. And what is the size of your GPU's VRAM?

Reason being, if your textures are very large, and your using a fair number of them, then, it may be filling up your VRAM beyond capacity. Therefore the computer will have to constantly swap textures from your main RAM to VRAM, which isn't exactly a quick process.


Pete Carter(Posted 2008) [#7]
im using 2 1024x1024 textures for the track one for texture one for shadows and a 256*256 for each of the 4 cars


Beaker(Posted 2008) [#8]
You say you are using split screen (and this seems to slowdown). Try using "CameraProjMode camera,0" instead of "HideEntity camera". This is known to be faster. Also, how exactly are you rendering/displaying each view in your split screen setup? CameraViewport?


Abomination(Posted 2008) [#9]
My game still exists mainly in my head, witch makes it harder to do some speedtests. ;)
Can someone tell me where I will find myself in "big" trouble?
I'm planning a mesh containing some 1000 triangles, with 200 textures of 64*64 pixels.
I want to put them in 256*256 images, so I would end up with about 12 surfaces.
I expect the sprites to need a similar amounts of graphics.(including shading)
Should I try to get as much textures in as little surfaces as possible, or can the average GFX-card handle these things with ease?

(hope you don't mind me hogging your tread Pete)


Ross C(Posted 2008) [#10]
You shouldn't have any slowdowns really that i can see. combining your textures is def a good idea though.

Beaker, i think the hideentity on the camera got sorted out. I do believe it still is a wee bit quicker though :o)


KimoTech(Posted 2008) [#11]
200 textures!? I think thats a big bottleneck. As described in the DirectX SDK, use 256x256 textures as they are fast, and always try to use the lowest number of textures as possible, as many textures kills the framerate just like too many batches (B3D Surfaces). :)


Pete Carter(Posted 2008) [#12]
how exactly are you rendering/displaying each view in your split screen setup?


the split screen is just the basic create 4 cameras that are jointed to a pivit that follows the cars and then assign each camera a 1/4 of the screen. like this
CameraViewport camera3,screenWidth/2,0,screenWidth/2,screenheight/2

is there another way?


Abomination(Posted 2008) [#13]
@Qimmer
I ment 200 subtextures divided over a number of 256*256 images.
Or is that indeed what You understood? (in that case I'm, sqrewed)
But how much is "many textures"? And how much "batches are too many"?