playMaker

Author Topic: Using too many Bools???  (Read 1842 times)

iEpic

  • Playmaker Newbie
  • *
  • Posts: 48
    • IndieGamerWorld
Using too many Bools???
« on: January 13, 2017, 02:47:45 PM »
Does using a lot of global bools and testing them every frame impact performance at all?

Fat Pug Studio

  • Beta Group
  • Hero Member
  • *
  • Posts: 1294
    • Fat Pug Studio
Re: Using too many Bools???
« Reply #1 on: January 14, 2017, 12:40:59 AM »
What number is too many? 5, 10, 50000 bools?
Available for Playmaker work

iEpic

  • Playmaker Newbie
  • *
  • Posts: 48
    • IndieGamerWorld
Re: Using too many Bools???
« Reply #2 on: January 19, 2017, 10:57:19 AM »
like around 300

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Using too many Bools???
« Reply #3 on: January 20, 2017, 01:50:28 AM »
Hi,
In standard you always want to try using less as possible 'every frame'
but if you have to, you can use the profiler to see how much it impacts on the performance.

Are you testing the bools each separately or with a single action (bool all true/false)

You might wanna try different solutions.
Maybe you can use arrays or only test the bools on a certain moment.
it all depends on your project.