Does using “My Behavior” increase efficiency?
What’s up guys, I have a question that I’m sort of hoping that someone else may have already run into.
I’ve done a number of searches and turned up limited info on the topic.
I have a number of actors that are essentially the same for the majority of their behaviors, with only slight variations on what sound that play when destroyed or what size they are scaled to, etc.
If I were to put the main attributes for their movements, collision, etc into a main behavior via “my behaviors”; would that save on memory and increase performance?
Currently they were simply duplicated, and had their individual variables changes as needed.
In terms of programming; I guess I’m wondering if the “my behavior” actions are created as a subroutine in the final compiled executable; and if so whether or not there is an appreciable amount of performance savings as a result.
I’ve done a number of searches and turned up limited info on the topic.
I have a number of actors that are essentially the same for the majority of their behaviors, with only slight variations on what sound that play when destroyed or what size they are scaled to, etc.
If I were to put the main attributes for their movements, collision, etc into a main behavior via “my behaviors”; would that save on memory and increase performance?
Currently they were simply duplicated, and had their individual variables changes as needed.
In terms of programming; I guess I’m wondering if the “my behavior” actions are created as a subroutine in the final compiled executable; and if so whether or not there is an appreciable amount of performance savings as a result.
Comments
Ace
The behaviors are created, and work perfectly as is, but if my time spent optimizing is better spent elsewhere... then that would be where I’d generally prefer to allocate it.
In terms of investments I’m wondering what the ROI (return on investment) is lol… That’s the best way I can equate it.
Also be sure to name the behavior before dragging it over there. otherwise you will have several custom behaviors name Rule
that said, for development myBehaviors sure speeds things up... I even put the constrainAttributes in there...
and much longer rules even if they do need minor tweaks for individual instances...
and I drag some notes... with position type of info...
and listen to @tenrdrmer... name before dragging!
MH
If that’s the case then I’ll probably make use of it for my next version iteration, and stick to attenuating spawn rates (and whatnot) to try and save on resources for now.
I started this project (and started using gamesalad) like last week, so much of this game was made with an element of experimentation. I’ve been going back and changing “move-to” behaviors to “interpolate” after my actors missed their mark and flew on by (i.e. off the screen hahaha) among other minor inconveniences.
I’ve already peeled off all of the custom numeric fonts I had put in place; and just about every other constraint dependency that I could think of to improve performance in an attempt to support older devices… I’m kind of just looking for anything else to improve upon that wouldn't necessarily effect gameplay.
Thanks again for all the quick replies guys.