Slow with hundreds of cubes

Blitz3D Forums/Blitz3D Programming/Slow with hundreds of cubes

Peb(Posted 2010) [#1]
I am writing a program with 5000 cubes (entities).
It ran fine, but after adding these cubes , it gets really slow when I run it
.
Should I operate with meshes instead of entities?
Should I compile the program to get better speed?

Thanks in advance for any help!

---EDIT:---
My processor and graphics card are quite uptodate and fast.

Last edited 2010


K(Posted 2010) [#2]
"Should I operate with meshes instead of entities?"
What do you mean?, a mesh is an entity. Do you mean all the cubes added together as one mesh(=entity)?
One thing I'd recommend is tweening, but I don't know exactly what you mean.

Last edited 2010


Ross C(Posted 2010) [#3]
Your creating 5000 surafces essentiallty, which is going to be really slow. Why do you need to create 5000 cubes though?


SLotman(Posted 2010) [#4]
Create 1 cube, then use copyentity to create the others - this should keep the surface count low and speed things up.

This runs at 60 fps here for me:


Last edited 2010


jhocking(Posted 2010) [#5]
Why do you need to create 5000 cubes though?


Maybe he's making a Minecraft clone.


Rob(Posted 2010) [#6]
minecraft is best done with quads in a single surface using a texture atlas. optimisation: If a side of the cube isn't touching any air, don't render it.


Peb(Posted 2010) [#7]
Many thanks for the help. And Joe was guesing correctly.