- Home /
What's a good draw call count?
Hello I'm working on a game and I'm designing it with a balance between performance and fidelity in mind, how many is too high?
The profiler is greyed out, I think I forgot to mention I'm using Unity Free.
Any draw call count below 1 is pretty good, but then again that wouldn't make a very interesting game ^^.
Okay I have an idea... "How many draw calls can a gigabyte of DDR3 RA$$anonymous$$ handle?" What I can do is add up the numbers, so if I wanna design for PCs with 4GB of DDR3 and can produce over 500 megahertz of CPU and GPU speed that have 512mb of VRA$$anonymous$$, I can develop around that estimated number of drawcalls. I am VERY paranoid about performance and optimization so this is why I asked...
Draw calls don't really have anything to do with the GPU, they are CPU-based. Nobody can give you any hard numbers, since draw calls are only one factor among many in how fast a game will run. What you need to do is get some hardware that you want to support and test on that, or at least get somebody else who has that hardware to do it. That's what all game developers do, and it's part of why beta testing exists. It's also why quality settings exist, so you can scale things back and have less powerful hardware still run the game acceptably. (But, supporting a .5GHz CPU? Does anyone actually use a computer that old?)
Answer by Eric5h5 · Mar 14, 2014 at 03:16 AM
It depends on the hardware you're targeting, so there's no particular answer. Use the profiler to measure performance.
Answer by robertbu · Mar 14, 2014 at 08:52 AM
Without the compiler, just run a test.
Create a single object of the complexity you will be using for your game in the scene.
Put a material and texture (using a representative shader) on this object.
Scale the object down and make it a prefab.
Add a cube to your scene.
Add the the following script to the cube.
Initialize the 'prefab' variable with the object created in step 1
Put an FPS script in the scene (you will find a FPS script in the Unity Wiki).
Build and run the app on the target device
Tap the cube to create 25 objects at a time. Note when the FPS drops. Note when the FPS become unacceptable.
Since you are starting with such a simple scene and your game will be more complex, these will be the outside limits for that device using the specified material. You may want to experiment with simpler materials and less complex prefabs to see what you buy in terms of performance.
#pragma strict
var prefab : GameObject;
function Update() {
transform.Rotate(0,Time.deltaTime * 180,0);
}
function MakeMore() {
for (var i = 0; i < 25; i++) {
var go = Instantiate(prefab, transform.position + 4.0 * Random.insideUnitSphere, Quaternion.identity);
go.renderer.material.SetTextureOffset("_MainTex", Vector2(0.01,0.0));
go.transform.parent = transform;
}
}
function OnMouseDown() {
MakeMore();
}