Slow with hundreds of cubes
Blitz3D Forums/Blitz3D Programming/Slow with hundreds of cubes| 
 | ||
| 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 | 
| 
 | ||
| "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 | 
| 
 | ||
| Your creating 5000 surafces essentiallty, which is going to be really slow. Why do you need to create 5000 cubes though? | 
| 
 | ||
| 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 | 
| 
 | ||
|  Why do you need to create 5000 cubes though?   Maybe he's making a Minecraft clone. | 
| 
 | ||
| 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. | 
| 
 | ||
| Many thanks for the help. And Joe was guesing correctly. |