game is really slow?

Hello when i run my game it goes really slow now i have a small world made out of cubes and its weird because when i play minecraft or cubelands there game does not go as slow as mine game does is it because of the amount of colliders or is it something else? Plus the cubes i am using has no textures at all on it its just a regular cube.

While a cube appears simple it contains 12 vertices, everyone brings up your draw calls and slows your fps. If you have 10,000 cubes then that is 120,000 vertices without optimizations. On the lowest render distance in minecraft there is around 1,000,000 cubes but only around 20,000 vertices. How? Something called voxel data. Head over to http://coredev.makingforum.com/f18-voxel-engine-development-blog for a tut on how to get a basic voxel world going. Ps. There is also a beginner series under Community → Unity Tutorials Series.

just make sure that you don’t have any extra objects that you don’t need, and just remember, that when you play your game in the editor, (if you are) it can run slower then when you actually build your game, this is because unity is doin’ stuff in the background, so don’t worry about that too much…

hope this helps…

-Grady

minecraft uses an engine designed specifically for the task it achieves. you’re using a general purpose engine which requires specific optimizations for something like that. if you’re creating a voxel grid of cubes like minecraft is, I’d imagine your overdraw is insane… and you’re probably being killed by fillrate and draw calls.

A game engine has a lot of tasks to do in order to display each frame. Usually the most time consuming job is the rendering process. First of all, take a look at the Stat window (click the Stat button over the Game view). Check the FPS rate: 10 or less is bad, 30 is a good mark. If the FPS rate is low, check Draw Calls to see how complex is your scene: 50 draw calls is a piece of cake, 1000 draw calls may be too heavy for many low end PCs. If the draw calls number is low, then your problem is not in the rendering process: it may be caused by time consuming tasks executed in the Update function - FOR or WHILE loops with hundreds or thousands repetitions.