Jump to content
Sign in to follow this  
CptBBQ

Two comletely unrelated questions

Recommended Posts

Hi folks!

Sorry for the topic, but I don´t think either of these questions deserves it´s own thread^^

.. so here we go..

1.) What´s the performance impact of actions added with 'addAction'?

I usually do not remove actions that are used more than once. Instead I use a variable in the condition and change it to 'true' whenever the action should show up.

Now I´m facing a situation where I´d have to create a whole lot of actions (30+, within sub-menus and sub-sub-menus) in a few-players mp environment.

It would be quite a pain to delete and re-add the actions, but I fear this could tear down our already wavering server performance.

Probably only a dev can know this for sure, but I´d be happy with some educated guesses from someone more experienced with the game engine.

Of course, just stating 'how you would do it' would already be of great help :)

... and now for something completely different...

2.) Is there some kind of limit to the number of markers the game can handle?

In another context, I created a bunch of markers (within the editor) as a basis for an AI-waypoint/spawnpoint grid. I got a little carried away there, and ended up with quite a lot of markers. Later, while testing several scripts within this mission, I received a number of errors all related to a few markers which seemed to be inexplicably missing. I couldn´t find them in the editor either so I replaced them. But the same errors occurred later with other markers, and other scripts using markers also behaved strangely.

My solution was to delete a bunch of markers from my grid and now everything is back to normal.

But that whole thing got me curious. Is there a known fixed limit for markers? If so, is there a way to get around this limit?

Thanks for reading all this. Any ideas are appreciated.

Cheers,

CptBBQ

Share this post


Link to post
Share on other sites

1. Not sure - but I can't see how it would affect performance bcoz the script the addaction is firing would once and then finish - unless it was a looping script of course. Thinking about it further, it would depend what each addaction when fired would be adding to the server demands. Spawning new enemy for example. But that's not a problem of the addaction - but the result of whatever is triggered by the addaction.

2. I don't know the numbers - but can you tell me how many you had so I know for myself in future. :)

Edited by Lightspeed_aust

Share this post


Link to post
Share on other sites

Thanks for the reply!

I should clarify some things:

about 1.: I was referring to the actions themselves, not the scripts they´re calling. Those actions regularly have to check whether their condition statements are true or false. As I can tell from their ingame-behavior, this happens very often, because actions hide and show very quickly when the condition changes. The cpu usage should be depending on the complexity and number of condition statements. In my case there will be some booleans for each action that have to return 'true' for the action to show up.

I was wondering what the impact on client performance (ignore my gibberish about server performance above^^) would be, if you had 30-something actions checking for their condition to become true (or false) at any time during the game.

about 2.: sadly, my observations aren´t very scientific, so I´m not even sure I´ve got the problem pinpointed here. I figured I wouldn´t be the first one to experience this if such a limit really exists...

Share this post


Link to post
Share on other sites
but I fear this could tear down our already wavering server performance.

Actions are local to the machine you add them on. Thus, the condition of an action is run on the client(s). I guess it's same as having a trigger or waituntil.

Share this post


Link to post
Share on other sites
Actions are local to the machine you add them on. Thus, the condition of an action is run on the client(s).

yeah I know...

I was wondering what the impact on client performance (ignore my gibberish about server performance above^^) would be...
I guess it's same as having a trigger or waituntil.
That would make sense. So, I guess you would remove and re-add the actions instead of hiding them?

Share this post


Link to post
Share on other sites

About the first question, yes, players will have issues with calculating every frame the 30+ action conditions at same time, all the time. So yes, better option will be to remove the actions and then add them when needed.

No marker limit that I know of.

_neo_

Share this post


Link to post
Share on other sites

Thanks neoKika! I guess I will remove the actions after all.

Regarding the marker limit: it probably takes an unusual amount of markers to hit the limit. I´ll see if I can create some kind of reproducible test for this.

Share this post


Link to post
Share on other sites

regarding the marker amount i guess the problem is your spelling errors if you have so many.

If you are totally sure that all spelling including "" around markers is correct, try and run a iteration of an array containing all markers and add any marker that isNil to a new array and then after all is counted show a hint with all those markers that are isNil then you can rule out or easily do a debug or a count of how many that are possible to use if you are near a limit.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×