Author Topic: Need advice on draw call dilemma  (Read 5093 times)

sstublic

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 2
  • Posts: 15
    • View Profile
Need advice on draw call dilemma
« on: January 17, 2015, 06:41:18 AM »
I have a dilemma and I was hoping either ArenMook or some of the users might help out:

I have a scene with approx. 10 drawcalls and 500 tris.
One of these drawcalls consists of 25 objects (sprites + labels) which often move, resize and tween in relation to one another.

So, is it better to
1. leave it at 10 drawcalls and have this one panel's geometry being constantly rebuilt
OR
2. change these 25 objects to panels and have no geometry rebuilding BUT increase number of drawcalls to 35 ?

The game is targeted at mobiles (both iOS and Android) and I do not care much for low end extreme devices.

Any hints and personal experience is welcome!

Thank you.

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: Need advice on draw call dilemma
« Reply #1 on: January 19, 2015, 06:18:09 AM »
3. The middle ground.

Take the elements that move often (always) and put them into a single panel, so it's only the moving things that get rebuilt when that triggers. I doubt you would need to split each moving element out into its own panel.


Old:
*Panel
**All the elements

New
*panel
**static elements (rare moving)
*panel 2
**Active elements (moving, changing etc)


sstublic

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 2
  • Posts: 15
    • View Profile
Re: Need advice on draw call dilemma
« Reply #2 on: January 19, 2015, 09:23:56 AM »
Thanks Nicki!

I already had a similar setup. It's a puzzle game and the board can be 5x5 = 25 elements. Player can touch any/many of those and cause a tween. They were all grouped together in one panel.

Since my post I tried separating them so that each is a panel. I've read that 40 drawcalls should be fine with mobile devices.
I'm doing some testing to decide if I'm gonna leave it that way. So far performance seems slightly better than before.

Cheers!