lag from cubes?
Blitz3D Forums/Blitz3D Beginners Area/lag from cubes?
| ||
I have a guy moving and jumping around a plane with a bunch of cubes(no more then 40). It mostly stays at 60 fps, but drops to below 30 in some spots. I think it's because I creating so many variables that are not needed. It could also be because I have 2 cameras going at the same time(thus doubling the polycount?). Please tell me there is an easier way then this(all the cubes do the same thing and have the same collisions, just different textures and sizes): |
| ||
an array? |
| ||
Trust me, it has nothing to do with the number of variables you are using. It obviously isn't the number of cubes you have on-screen because 40 is only 480 polygons. Almost certainly it is due to the number of collision types you are using. Try reducing that number and I bet you'll see better results. |
| ||
Also, if the frame rate drops below a certain number, it's probably to do with the flip true you will most likely have. Try flip false, and the frame rate should stay more stable. I'd go with Wolron too and suggest the number of collisions your using, maybe even the number of surfaces might have an effect too. Try and combine them using addmesh or something :o) |
| ||
you could work from your player and do visable distance to say if it rendered |
| ||
works it you are doing single player turn enties of untill needed |
| ||
Make a box type:Type box Field entityhandle End Type Then use a loop: For 1 to [however many boxes you want] b.box = New box b\entityhandle = CreateCube() EntityType b\entityhandle, wall_col etc....... |
| ||
It's not the variables that's causing the slowdown. It's the number of collisions or and the number of surfaces :o) |
| ||
actually, in quad1, where the cities were generated with cubes, i only had 50 cubes and the FPS was TERRIBLE. that was on a celeron 1.4, with an intel 810 graphics set... Quad2 ran much better as the cities (when they were in there) were generated from a single surface, building the cubes by hand onto it... |