Slowdown
Blitz3D Forums/Blitz3D Beginners Area/Slowdown
| ||
I have a small terrain, that is textured with a 128X128 grass texture. The problem is, when I apply the texture to the terrain, the program slows by 30 fps. Any ideas why this happens? |
| ||
When you say "By 30 FPS" do you mean from like 180 to 150Fps. Its perfectly normal for the added texture to slow down a previously running program, but you havent really said how much its slowing by (%) to know if its a problem or not. |
| ||
You're not giving us much to go on, are you? Slows by 30FPS could mean the difference between 31fps and 1fps or it could mean the difference between 2400fps and 2370fps. Frames per second is not linear, so it's very important what kind of numbers you're talking about. |
| ||
It slows by 50%, the average fps on all the machines I have tried it on is 60. |
| ||
Please show us the code or a demo Terry - then we can comment. The way you are doing this may affect the results, so the code is preferable. IPete2. |
| ||
This is the code I use to texture the terrain. If I take off the lightmap then the program still runs at 50% but if i take off the grass texture it runs at full speed. Tex = LoadTexture("media\Grass.bmp") tex2 = LoadTexture("Media\h1l.bmp") ScaleTexture tex2,TerrainSize(Terrain),TerrainSize(terrain) EntityTexture Terrain,Tex EntityTexture terrain,tex2,0,1 |
| ||
This might sound like a silly question.... but your are creating the terrain & texturing it outside the main-loop aren't you? Only I've done silly things like place something that only needs doing once in the main-loop before & it ends up getting re-created each cycle... a definate frame-rate killer! lol |
| ||
What GFX card do you have? Also, what size in pixels are your textures? |
| ||
Ok so I have noticed somthing else, it only slows down when I face the center of the terrain. And the dimensions of the textures are 128X128. I am not sure what my GFX card on my work computer is, but I got it 2 weeks ago so it is fairly good. |
| ||
if you put it INSIDE the main loop, it could be deleting and reloading the texture every loop (VERY fast looping, VERY hard on the computer) |
| ||
I didnt put it in the main loop, it is only called right after the graphics command. |
| ||
I am not sure what my GFX card on my work computer is, but I got it 2 weeks ago so it is fairly good. Uhh.. they didn't stop selling crappy videocards in the past two weeks. So you have nothing else going on but this lightmapped terrain, and you're down to 30fps? If so, can you post the whole code? There shouldn't be too much to it if it's just a terrain. |
| ||
do you have the latest b3d update and the latest drivers for your gfx card? |
| ||
@ Mortis Yes I do. |
| ||
it could have been just going super fast because there was nothing operating inside the main loop untill you added the terrain, giving it a more...realistic? FPS. |
| ||
Well then, why don't you post you full source code? |