playMaker

Author Topic: "PlaymakerTriggerEnter" performance  (Read 1042 times)

Hasuman

  • Playmaker Newbie
  • *
  • Posts: 19
"PlaymakerTriggerEnter" performance
« on: January 03, 2023, 09:58:53 AM »
Hi,

I've been working on a game for two years now and now I'm at the part where I'm optimizing the game to my best ability. The enemies in my game are the main issue with the performance, each level having around 100 of them, and I've done everything to avoid loops and every frame updates to happen to keep idling enemies as lightweight as possible for CPU.

But the game still could run better, so I noticed all of my enemies have automatically added scripts like "PlaymakerTriggerEnter" etc. I'm wondering if Playmaker will re-add the necessary ones if I were to delete those scripts manually for testing purposes? The scripts have changed a lot and I relied a lot on triggers/physics-based things in the past, but not as much anymore.

I can't remember which of those automatic trigger/physics scripts Playmaker would still require to keep my own AI scripts running, so I'm asking if Playmaker will still re-add them to the prefab enemies on demand?

Sorry if this sounded a bit ranty and messy. I'm just running out of ideas on how to optimize my enemies at this point, so I'd want to try deleting the automatic scripts and see if it changes anything. It's an old messy project after all so who knows what's eating the performance at this point.
« Last Edit: January 03, 2023, 10:01:19 AM by Hasuman »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7618
    • jinxtergames
Re: "PlaymakerTriggerEnter" performance
« Reply #1 on: January 04, 2023, 03:19:50 AM »
HI.
Yes, they should be added automatically.

what you can do is remove, then make a profiler build so you can see what uses a lot of resources.

before you do, use some kind of version control (github desktop for example) or at least make a backup of your project just to be save.

Christoph

  • Beta Group
  • Sr. Member
  • *
  • Posts: 256
Re: "PlaymakerTriggerEnter" performance
« Reply #2 on: January 11, 2023, 09:47:17 PM »
With 100 enemies you want to make sure they all are extremely optimized with low poly count and you also want to try optimize them maybe with LODs. Some good assets available for this.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7618
    • jinxtergames
Re: "PlaymakerTriggerEnter" performance
« Reply #3 on: January 12, 2023, 12:52:37 AM »
Hi.
if you use trigger events,
Maybe you can replace with for example box cast and do this once every x frames, this will improve performance a lot if you have many enemies, also it eliminates the need to the 'Trigger Enter' component.

some of the cast action have their own interval, else there is also a action called Next Frame Advanced on the Ecosystem