x


How does the iPhone handle draw calls?

At the moment, I'm creating my game using Unity Indy. Once I think I have enough work to start testing on an iPhone, I'll be switching over to Unity iPhone. But in the mean time, I have some questions and would appreciate it if you guys could help me out:

1:First of all, I read that I should keep my draw calls at around 30, does that sound correct?

2:Also, I want to have 15 enemies on screen, same model, same texture, same material. Will that still result in 15 different draw calls?

3:Do particles count as many draw calls or just one(or a few?)

4: If I have a very low usage of textures(almost none), no lighting at all, and VERY low poly models. Could I get away with more 40-50 draw calls?

In order for my game to play like I envision it, I will be needing to have 20-30 enemies on screen at once at times(definately not always, the usual count will be 10-15).

The way I see it now I'll have these draw calls:

1 draw call for my main player 5 reserved for my simple terrain mesh(just in case I use more than one texture) 15 draw calls for every enemy. ?? draw calls for particle effects. 5 reserved for UI. 5 for rockets/power ups. 5 for loose objects that the player will interact with somehow.

This is a total of 36..will I be able to run it at 30fps?

Thanks in advance, and sorry if this question has been aswered too many times before.

more ▼

asked Aug 09 '10 at 05:20 PM

Osman T gravatar image

Osman T
1 1 1 3

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first
  1. Depends on the CPU speed. The difference between the first-gen iPhone and the iPhone 4 is pretty huge.

  2. If the models are under 300 vertices and share a material, then they are batched into one draw call.

  3. Each particle system is one draw call.

  4. You probably would be using no lighting and low-poly models anyway; textures don't make that much difference.

will I be able to run it at 30fps?

Depends on which device you're talking about, your code, etc.

more ▼

answered Aug 09 '10 at 06:08 PM

Eric5h5 gravatar image

Eric5h5
80.3k 42 132 521

Thank you!

What do you mean 'textures don't make that much difference?'. Is the iPhone really good with handling some textures? Or am I being a newbie here :). Thanks again.

Aug 10 '10 at 10:54 AM Osman T

@Osman T, textures generally don't make a big difference as far as speed goes. If you have a 256x256 texture on an object off in the distance, it's only computing, say, an 8x8 texture due to mipmaps (or some other size, depending on the distance).

Aug 10 '10 at 06:39 PM Eric5h5
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x2000
x662
x110

asked: Aug 09 '10 at 05:20 PM

Seen: 3221 times

Last Updated: Aug 09 '10 at 05:20 PM