lag from cubes?

Blitz3D Forums/Blitz3D Beginners Area/lag from cubes?

po(Posted 2004) [#1]
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):



wizzlefish(Posted 2004) [#2]
an array?


WolRon(Posted 2004) [#3]
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.


Ross C(Posted 2004) [#4]
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)


Duckstab[o](Posted 2004) [#5]
you could work from your player and do visable distance to say if it rendered


Duckstab[o](Posted 2004) [#6]
works it you are doing single player turn enties of untill needed


wizzlefish(Posted 2004) [#7]
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.......



Ross C(Posted 2004) [#8]
It's not the variables that's causing the slowdown. It's the number of collisions or and the number of surfaces :o)


Damien Sturdy(Posted 2004) [#9]
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...