Commit Graph

23 Commits

Author SHA1 Message Date
Cyberboss
210a790a4a Adds SS initialization messages to world.log 2017-02-01 22:14:14 -05:00
MrStonedOne
09f5f46481 Fixes the mc treating subsystems that slept in fire() improperly
Originally I wanted to just say that such a thing is unsupported, but since byond can just randomly decide to insert a bunch of sleeps into a loop, I can't make that requirement on subsystems, so its now supported.
2017-01-30 03:38:13 -08:00
oranges
ca894aa845 Merge pull request #21801 from Cyberboss/CloseTheDamnThings
MC/SS Shutdown. Tguis now close on world reboot
2016-12-01 12:12:38 +13:00
MrStonedOne
76e1c6916f VV refactor 2016-11-30 12:49:21 -08:00
Cyberboss
ac1003c9cd Didn't save everything 2016-11-27 18:46:04 -05:00
Cyberboss
8cf1b974dc You can now expect MC and SS Destroy to be called on round end
Runs the GC queue on SSgarbage Destroy
2016-11-27 18:06:08 -05:00
Kyle Spier-Swenson
2aeb8736fa Fixes subsystem cost calculation being much higher then true 2016-08-07 16:03:38 -07:00
Kyle Spier-Swenson
235b79fb5a StonedMC, the bastard love child of GoonPS and CarnMC (#17987)
Basically, they key difference between StonedMC and CarnMC is that when multiple ticks want to run at the same byond tick, we divvy up the tick between the subsystems, rather then allow one subsystem to hog it all.

The key difference between StonedMC and GoonPS is that we allow the subsystems to tell us how to divvy up the tick using flags and priority.

The new SS_ flags allows us to select behaviors that used to be piggybacked as side effects of dynamic wait or default but sometimes unneeded behavior.

Dynamic wait is 100% gone, lower priority and SS_BACKGROUND are better more refined ways of doing this when combined with MC_TICK_CHECK

I have by design never looked at the inners of goonPS, so this is all original code but I know it uses two loops because of comments by goon devs on reddit threads, that design didn't make sense before, but when I can tell a SS how much of a byond tick it is allowed to have, knowing how many need to run this tick is helpful I also know a bit more about how it works from piecing together comments in #vgstation.

Detailed list of changes:

Subsystems now have flags, allowing fine grain control over things like rather or not it processes, inits, rather it's wait is how long between runs (post run timing) or how long between starts, and rather or not late fires should cause the next fire to be earlier.

Mc now has two loops One loop handles queuing shit, one loop handles running shit.

MC now splits up tick allotment rather than first come first serve Subsystems can even request a bigger share using higher priorities. (It will even resume subsystems it paused if other subsystems hadn't used as much as it predicted they might need)

Default fps is now 20 This is related enough to the MC and it's a change that's really long since over due

All code oddities are most likely to be necessities to lower overhead on the mc since it runs every tick
2016-06-16 18:01:16 +12:00
Jordie
265938e7d9 Merge pull request #17220 from Incoming5643/badmins_doing_shit
View vars will now tell you if something has been previously var edited
2016-05-01 17:02:02 +10:00
Incoming
10b966b97c View vars will now tell you if something's been previously var edited 2016-04-28 19:38:21 -04:00
Shadowlight213
f03d8f9b1a Changes to pause proc 2016-04-27 23:11:20 -07:00
Shadowlight213
1ad3b440ff Adds var to disable Tick checking in the MC for subsystems. 2016-04-27 14:04:45 -07:00
MrStonedOne
5160486e3f Removes 509 support. 2016-04-16 02:16:19 -07:00
MrStonedOne
17672765e6 Makes the code compile under 509 2016-03-15 04:28:42 -07:00
MrStonedOne
e1f86855b4 dynamic wait subsystems will not priority run in any situation, even when paused. 2016-03-15 03:39:44 -07:00
MrStonedOne
2887dc7ce0 Removes lag.
This setup allows subsystems to pause themselves until next mc fire if they are about to go over a tick, and resume on the next mc tick
It also makes it so we prioritize running subsystems we skipped because there wasn't enough time in the current tick to run them based on their avg tick usage. (as well as subsystems paused mid way thru)

Adds a macro for adding this to non-mc procs. just drop it in the loop. There is a define version as well for if checks if you want to know if you just slept to avoid lag.

This is all inside #if DM_VERSION defines, so once i test that 509 still works to compile/test this should be good to merge
2016-03-15 03:39:39 -07:00
MrStonedOne
c91c592f04 MC: tweaks, midnight rollover fix, and some 510 work
Fixes the mc getting all fucked up during midnight rollover

Mc now tracks the tick_usage of every subsystem, and will skip running an expensive subsystem if we are too close to overrunning in a tick, waiting until next tick, unless that subsystem is excessively past due (because we kept skipping it).

It now assumes that 20% of a tick should be saved for byond to do it's things, and stops running all subsystems once we get to 80% tick usage.

Dynamic wait will only smooth out wait changes over 8 fires if the new wait is lower than the old wait, before it would smooth out wait increases as well as decreases.

The fps throttle system is now 509 only.

The mc will now run every 1ds, no GCD bullshit, as we want to spread things out more.

Offline subsystems will still show their stat message

DS is now rounded to 2 digits, not 3, to make room for the tick percentage bit, and because the 3rd digit was useless and all MoE
2016-02-07 18:03:19 -08:00
Kyle Spier-Swenson
b38d9301e6 sigh 2015-12-17 23:53:44 -08:00
Kyle Spier-Swenson
cd7511b100 Fixes subsystem on varedit typos 2015-12-17 15:33:45 -08:00
Kyle Spier-Swenson
3eb7466152 forgot to finish my comment 2015-12-17 07:17:51 -08:00
Kyle Spier-Swenson
a4c1ddc5c8 You can now safely start a subsystem by vv'ing can_fire to 1 2015-12-17 07:16:43 -08:00
Bjorn Neergaard
531e4b947f Subsystem display tweaks 2015-12-05 10:13:59 -06:00
Bjorn Neergaard
815ac7d2f9 Defcon improvements, renames, etc 2015-12-04 23:24:50 -06:00