playMaker

Author Topic: Draw call economy question...  (Read 3006 times)

arilarikins

  • Playmaker Newbie
  • *
  • Posts: 9
Draw call economy question...
« on: October 10, 2012, 04:39:00 PM »
Hi - Please excuse any stupidity in the following question - I'm very new to this...

I making a stack of 9 crates with rigid body physics for gravity, and one floor without. I want each crate to destroy itself when touched in an IOS device.

The crates are sprites with a collider (I'm using 2DToolkit for this). The cube and the floor uses 1 draw call each - when I duplicate the crates, the total draw calls are still only two.

If I do the same thing but attach an FSM to the first crate, the draw calls go up to four - I guess that this is one for the FSM, crate, floor and Playmaker script respectively?

The trouble is that when I increase the crates to 9 the draw calls go up to 20! I must have missed something here - is there a more economical way to do this?

Many Thanks in advance,
Harry

Sjones

  • Full Member
  • ***
  • Posts: 203
Re: Draw call economy question...
« Reply #1 on: October 10, 2012, 05:48:30 PM »
if you are getting the draw call count on the device, this is moste likely because the debug state label is on, in the fsm editor you can turn this off and playmaker shouldn't make any effect on draw calls

arilarikins

  • Playmaker Newbie
  • *
  • Posts: 9
Re: Draw call economy question...
« Reply #2 on: October 11, 2012, 07:26:54 AM »
Hi...

Yes indeed, you were right. Many thanks for pointing that out - Draw call are now back to two! I can now see how much resources I have to play with the rest of the scene.

What are the state labels for, and why are they on by default?

Thanks again for taking the time,
Harry

Sjones

  • Full Member
  • ***
  • Posts: 203
Re: Draw call economy question...
« Reply #3 on: October 11, 2012, 11:20:14 AM »
they are there for debug, especialy on mobile devices if your game stops responding and an fsm is stuck in a state, it will tell you what state it is in and give you a pointer to what is going wrong, its purely for debug and most likely they are on as when you start a project you will have issues rather then later on when your polishing stuff up so they are on by default and can be turned off later.

arilarikins

  • Playmaker Newbie
  • *
  • Posts: 9
Re: Draw call economy question...
« Reply #4 on: October 11, 2012, 01:57:13 PM »
I see...

Many Thanks for your help in explaining this.

Harry
« Last Edit: October 12, 2012, 02:49:35 PM by arilarikins »