- Home /
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.
$$anonymous$$inecraft doesnt use cubes, that's just an illusion, the game calculates which faces are visual and then create one mesh that covers 64 by 64 blocks - called a chunk.
Answer by landon912 · Dec 09, 2012 at 05:20 AM
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.
Can you please explain why you disliked this so I can improve my answers?
+1 to that answer..dont know why anyone would dislike it
Answer by Grady · Jul 01, 2011 at 02:05 AM
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
only- if he has thousands of overdrawn cubes, it's not just the editor. it's definitely fillrate and draw calls. This is a very common problem, and it can only be solved through combining.
They even had an on-stage demo of this at Unite back in 2007. he went from like 3fps to over 60FPS in the editor, and all he was doing was drawing cubes:
http://unity3d.com/support/resources/unite-presentations/performance-optimization.html
It's a long video, but full of useful information. Including the example I mentioned
Hmm so 6 months is the new 2 years. What is wrong with answering an old question? You have to take 2 seconds to delete your email? If you answer an old question hopefully people asking the same thing will find this ins$$anonymous$$d of making a new post? I really don't get the prob
It's not 6 months, it's 1 year 6 months. (For some stupid reason you have to hover over the date to see the year.) Not that answering an old question is necessarily bad, assu$$anonymous$$g you have new info and the question hasn't become obsolete.
Answer by testure · Jul 01, 2011 at 12:03 AM
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.
^ This.
What's the point of making a "Lego" world out of texture-less cubes anyway? Recreating $$anonymous$$inecraft? I've never played $$anonymous$$inecraft before and I'm already bored of it. XD
Answer by aldonaletto · Jul 01, 2011 at 02:45 AM
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.
Your answer
Follow this Question
Related Questions
slow geforce card detected 2 Answers
iOS 5 and UNITY... 0 Answers
Problems operating unity..... 0 Answers
unity application getting slow 0 Answers
How do I lower the render texture to make my game move faster? 1 Answer