Laser50 wrote:
I've been using their Master Controller method because it seems to work quite well to maintain performance and deal with a boatload of crap at the same time.
Not to attack you persay, I've tried to ask various SS13 coders and they all just kind of shrug at the subject since it's either too complicated(arguably convoluted)/ too much work to change anything / it's the epitome of legacy code.
But what exactly do these controllers do good? As far as I can tell it's creating a pseudo task controller with in an environment that already has one.
Further more, I'm not sure if you are doing this but in it's original usage every proc you can imagine gets shoved into a controller and loopchecked even if it doesn't need to be. Every 1 or 2 10ths of a second no less.
Oh, no offense taken at all. I think that they're using it as a way to process everything without turning everything into it's own loop. It's more structured to work with, and because of the delaying in-between, everything has time to finish itself, and might keep some spare time with it.
I can't give you a definitive answer, though. But it works for me, and I don't really change it beside tweaking some smaller bits of it.
--------------------------------------
And toward Stephen;
I guess that'll be the right thing to do, although if this were to stack up, would this be in any way visible in the game? E.G World.cpu variable, or anywhere?
I left it on while picking up my diploma (Yay), and we're about 53,000 loops in, with a total of 14,000,000 conveyor calls, world CPU is still as it was when I left it.
The machinery_cost variable is also (still) displaying 0 at all times. Not sure if I broke that, but it hasn't changed.
But knowing how to spot that would be great. Since it'd make it easier for me to look at the issue.
(Just because why not, here's the profiler; http://puu.sh/9Rbcb/cf4c6a3a4f.png)
Not to attack you persay, I've tried to ask various SS13 coders and they all just kind of shrug at the subject since it's either too complicated(arguably convoluted)/ too much work to change anything / it's the epitome of legacy code.
But what exactly do these controllers do good? As far as I can tell it's creating a pseudo task controller with in an environment that already has one.
Further more, I'm not sure if you are doing this but in it's original usage every proc you can imagine gets shoved into a controller and loopchecked even if it doesn't need to be. Every 1 or 2 10ths of a second no less.