Forum rules - please read before posting.

Cutting down on actionlist lag

Hi there, this is something I've been pondering for a while so I gotta try to explain the best I can...

So, I have an interaction actionlist which is run when loading every NPC interact menu - every time an NPC is approached, a menu is loaded depending on their name, and they all run the same interaction actionlist within it... but it is MASSIVE and i mean massive. My game will briefly largely drop in framerate when the NPC is approached as it goes through all these checks, that, most of the time, will have nothing to do with them.

It has at least 50 different variable checks which is made up of checks for when certain menu elements should appear throughout the story (i.e. if you're on mission 3 then certain menu elements appear for certain characters...there are 36 missions to check), all put into 1 actionlist to save me from making separate actionlists for each character.

But I was wondering, would it cut down the lag if I actually made an interaction actionlist for each character instead of everything being in 1 actionlist, so that when it loads a certain NPC menu, it only loads their stuff? So I could make an actionlist for every character, put in only the checks that are relevant to that character and make them run their individual actionlist on approach instead of the all-in-one actionlist. The all-in-one actionlist is very large so I wanted to make sure it would work before I committed to this.

I hope this makes sense, it's kinda complicated in my head. Sorry for how long this was...
What do you think?

Comments

  • Unity's Profiler can be used to detect sources of lag.

    You haven't provided much in the way of detail (e.g. exactly how many Actions are running), it'd be simple to test out just by not running the ActionList at all and seeing if the lag disappears.

    Whether relying on scripts or Actions, you should certainly try to limit the code run at any time to just that which is necessary.  Again there's not much detail to comment on, but creating separate lists for each chapter might be the best way to start.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.