playMaker

Author Topic: Get Property, Set Property, Send Message etc.  (Read 37408 times)

Broken Stylus

  • Beta Group
  • Hero Member
  • *
  • Posts: 772
Re: Get Property, Set Property, Send Message etc.
« Reply #15 on: June 20, 2018, 11:30:26 AM »
Hi,

I think I read somewhere on this forum that we should avoid as often as possible using the set and get property, especially if pushing to mobile. Is that still true?
They're really excellent tools.

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: Get Property, Set Property, Send Message etc.
« Reply #16 on: June 20, 2018, 07:10:13 PM »
Some guidelines:

- If there is a custom action that does the same thing, use that instead.
- If you are getting/setting a property once (not every frame) it's probably fine.
- If you are doing it every frame, it might still be okay, but it's more likely to affect performance.
- Test on the target device as early and often as possible.
- Profile on the target device to find the bottlenecks and fix those.
- Don't optimize prematurely - but also don't leave it to the end!

It's a balance between getting stuff done and optimizing. My personal philosophy: The biggest risk with any game is that it's not fun! Use every tool you have to figure that out first. You don't want to waste time optimizing systems you will later scrap or rework.

EDIT: We also have some ideas to optimize these actions, but that's still a little bit down the line...
« Last Edit: June 20, 2018, 07:12:28 PM by Alex Chouls »