Commit Graph

26 Commits

Author SHA1 Message Date
SkyratBot
6a418150e8 [MIRROR] Spelling and Grammar Fixes (#29499)
* Spelling and Grammar Fixes

* they dont understand

---------

Co-authored-by: klorpa <30924131+klorpa@users.noreply.github.com>
Co-authored-by: projectkepler-RU <99981766+projectkepler-ru@users.noreply.github.com>
2024-08-22 02:34:54 +00:00
lessthanthree
12d989be4c [MANUAL MIRROR] Adds an Escape Menu (#19217)
* Adds an Escape Menu (#72906)

* suicide

---------

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2023-02-08 02:20:09 +00:00
SkyratBot
7a2292264e [MIRROR] fixes & increases SSinput click delay threshold & moves it and average_click_delay to deciseconds [MDB IGNORE] (#17952)
* fixes & increases SSinput click delay threshold & moves it and average_click_delay to deciseconds (#71520)

## About The Pull Request
theres an issue with SSinput calculating the average_click_delay that
made it skip queuing clicks much faster than it should have. now it
should work. also moves everything to deciseconds for consistency
(except for the statpanel display, which changes it to per second). also
i increased the click delay threshold to 1 tick in deciseconds because
really we should only be refusing to queue if SSinput is being skipped
for whatever reason or each tick is receiving massive non input overtime
## Why It's Good For The Game
feex queuing clicks to lower overtime when the server is overloaded
## Changelog
🆑
fix: queuing clicks should work correctly now
/🆑

* fixes & increases SSinput click delay threshold & moves it and average_click_delay to deciseconds

Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>
2022-12-06 22:15:21 +00:00
SkyratBot
75c5d3d10d [MIRROR] fixes _queue_verb() runtiming from /client/Click() thousands of times [MDB IGNORE] (#17034)
* fixes _queue_verb() runtiming from /client/Click() thousands of times (#70647)

* fixes _queue_verb() runtiming from /client/Click() and adds info

* Update code/controllers/subsystem/verb_manager.dm

Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>

Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>

* fixes _queue_verb() runtiming from /client/Click() thousands of times

Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
2022-10-20 12:29:05 +01:00
SkyratBot
a00cad0164 [MIRROR] Clean up subsystem Initialize(), require an explicit result returned, give a formal way to fail (for SSlua) [MDB IGNORE] (#16248)
* Clean up subsystem Initialize(), require an explicit result returned, give a formal way to fail (for SSlua)

* [PR for MIRROR PR] Changes for 16248 (#16277)

* Merge skyrat changes, update SR SS's, and remove lobby_eye

* Apply suggestions from code review

Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>

* Update modular_skyrat/modules/autotransfer/code/autotransfer.dm

Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>

* restore lobby_cam for now

Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>

Co-authored-by: Tastyfish <crazychris32@gmail.com>
Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>
2022-09-24 17:32:40 -04:00
SkyratBot
6ef42d16d7 [MIRROR] fixes verbs not actually queuing. [MDB IGNORE] (#15444)
* fixes verbs not actually queuing.  (#68990)

thanks to Vallat for pointing this out

whoops turns out most verbs havent been queued since may 11th because I made /datum/controller/subsystem/verb_manager have the SS_NO_INIT flag, without also removing a check in verb_manager/proc/can_queue_verb() that stops the verb callback from being queued if the subsystem isnt initialized yet. since subsystems with SS_NO_INIT obviously never have initialized set to TRUE, this always failed for every verb manager subsystem except for SSinput (because it doesnt have SS_NO_INIT).

also adds a debug var to force a subsystem to always queue incoming verbs if possible.

now the default verb management subsystem, and speech_controller will successfully queue verbs again. SSinput always queued verbs so that shouldnt change.

* fixes verbs not actually queuing.

Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>
2022-08-06 21:51:38 -07:00
SkyratBot
d8da1153b7 [MIRROR] Biddle Verbs: Queues the Most Expensive Verbs for the Next Tick if the Server Is Overloaded [MDB IGNORE] (#15329)
* Biddle Verbs: Queues the Most Expensive Verbs for the Next Tick if the Server Is Overloaded (#65589)

This pr goes through: /client/Click(), /client/Topic(), /mob/living/verb/resist(), /mob/verb/quick_equip(), /mob/verb/examinate(), and /mob/verb/mode() and makes them queue their functionality to a subsystem to execute in the next tick if the server is overloaded. To do this a new subsystem is made to handle most verbs called SSverb_manager, if the server is overloaded the verb queues itself in the subsystem and returns, then near the start of the next tick that verb is resumed with the provided callback. The verbs are called directly after SSinput, and the subsystem does not yield until its queue is completely finished.

The exception are clicks from player input since they are extremely important for the feeling of responsiveness. I considered not queuing them but theyre too expensive not to, suffering from a death of a thousand cuts performance wise from many many things in the process adding up. Instead clicks are executed at the very start of the next tick, as the first action that SSinput completes, before player movement is processed even.

A few months ago, before I died I was trying to figure out why games at midpop (40-50 people) had non zero and consistent time dilation without maptick being consistently above 28% (which is when the MC stops yielding for maptick if its overloaded). I found it out, started working on this pr, then promptly died. luckily im a bit less dead now

the current MC has a problem: the cost of verbs is completely and totally invisible to it, it cannot account for them. Why is this bad? because verbs are the last thing to execute in the tick, after the MC and SendMaps have finished executing.
tick diagram2
If the MC is overloaded and uses 100% of the time it allots itself this means that if SendMaps uses the amount its expected to take, verbs have at most 2% of the tick to execute in before they are overtiming and thus delaying the start of the next tick. This is bad, and im 99% sure this is the majority of our overtime.

Take Click() for example. Click isnt listed as a verb but since its called as a result of client commands its executed at the end of the tick like other verbs. in this random 80 pop sybil round profile i had saved on my computer sybil 80 pop (2).txt /client/Click() has an overtime of only 1.8 seconds, which isnt that bad. however it has a self cpu of 2.5 seconds meaning 1.8/2.5 = 72% of its time is overtiming, and it also is calling 80.2 seconds worth of total cpu, which means that more than 57.7 seconds of overtime is attributed to just /client/Click() executing at the very end of a tick. the reason why this isnt obvious is just because the verbs themselves typically dont have high enough self cpu to get high enough on the rankings of overtiming procs to be noticed, all of their overtime is distributed among a ton of procs they call in the chain.

Since i cant guarantee the MC resumes at the very start of the next tick due to other sleeping procs almost always resuming first: I time the duration between clicks being queued up for the next tick and when theyre actually executed. if it exceeds 20 milliseconds of added latency (less than one tenth the average human reaction time) clicks will execute immediately instead of queuing, this should make instances where a player can notice the added latency a vanishingly small minority of cases. still, this should be tm'd

* Biddle Verbs: Queues the Most Expensive Verbs for the Next Tick if the Server Is Overloaded

Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>
2022-07-31 22:03:59 +00:00
SkyratBot
583a5e704a [MIRROR] Fullscreen, status bar hiding, chat input following the theme [MDB IGNORE] (#14555)
* Fullscreen, status bar hiding, chat input following the theme (#67987)

* Initial commit

* input is colored according to the theme

* removed unused setting

* Fullscreen, status bar hiding, chat input following the theme

Co-authored-by: Andrew <mt.forspam@gmail.com>
2022-06-27 02:15:25 +01:00
SkyratBot
b87c7279b0 [MIRROR] Adds MC initialization stages. Earlier stages can fire while later ones init. Fixes tgui chat reconnection banner showing during init. [MDB IGNORE] (#13089)
* Adds MC initialization stages. Earlier stages can fire while later ones init. Fixes tgui chat reconnection banner showing during init. (#66473)

* Adds MC initialization stages. Earlier stages can fire while later ones init.
Removes TICK_LIMIT_MC_INIT config for barely doing anything to speed up init and being inconvenient to work with if fires and inits can happen at the same time.

* Adds MC initialization stages. Earlier stages can fire while later ones init. Fixes tgui chat reconnection banner showing during init.

Co-authored-by: Kyle Spier-Swenson <kyleshome@gmail.com>
2022-04-25 14:25:23 +01:00
SkyratBot
df651808d4 [MIRROR] Drastic Lag Mitigation Subsystem: SSlag_switch (#6786)
* Drastic Lag Mitigation Subsystem: SSlag_switch (#59717)

Requested by oranges and inspired by the upcoming event. A new subsyetem, non-processing (for now), aimed at providing some toggle switches that can be flipped as a last ditch effort to save some CPU cycles by sacrificing some non-critical mechanics. Below you can see each individual toggle.

Screenshot of the admin panel:
image
Surely there are more opportunities for toggles I missed, but adding new ones is not very difficult at all.
Why It's Good For The Game

Better performance during extreme pop, I hope.
Changelog

cl
code: Introduces the Lag Switch subsystem for when a smoother experience is worth trading a few bells and whistles for. Performance enhancement measures can be togged by admins with the Show Lag Switches admin verb or enabled automatically at a pop amount set via config.
config: Added a new config var: number/auto_lag_switch_pop

* Drastic Lag Mitigation Subsystem: SSlag_switch

* mirrored the changes to the modular file

Co-authored-by: Wayland-Smithy <64715958+Wayland-Smithy@users.noreply.github.com>
Co-authored-by: Useroth <37159550+Useroth@users.noreply.github.com>
2021-07-08 03:24:16 +02:00
SkyratBot
c0830c5fcd [MIRROR] Removed proc overhead from the Input subsystem (#6010)
* Removed proc overhead from the Input subsystem (#59339)

Co-authored-by: Watermelon914 <3052169-Watermelon914@ users.noreply.gitlab.com>

* Removed proc overhead from the Input subsystem

Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com>
Co-authored-by: Watermelon914 <3052169-Watermelon914@ users.noreply.gitlab.com>
2021-05-28 16:41:19 +01:00
SkyratBot
cf76ee5b1a [MIRROR] Communication hotfix (#1062)
* Communication hotfix

* bah

* Update preferences.dm

Co-authored-by: Couls <coul422@gmail.com>
Co-authored-by: Azarak <azarak10@gmail.com>
2020-09-30 01:12:57 +02:00
SkyratBot
1713561d4b [MIRROR] Rebindable communication(OOC, Say, Me) (#1055)
* Rebindable communication(OOC, Say, Me) (#54035)

 OOC, Say and Me is now rebindable

* Rebindable communication(OOC, Say, Me)

* Update preferences.dm

* wowee

* aaa

Co-authored-by: Couls <coul422@gmail.com>
Co-authored-by: Azarak <azarak10@gmail.com>
2020-09-30 00:50:37 +02:00
SkyratBot
c15be851f9 [MIRROR] Refactors the keys_held rolling buffer (#903)
* Refactors the keys_held rolling buffer (#53773)

* rolling key rip

* category

* comment

* oops

* Refactors the keys_held rolling buffer

Co-authored-by: Rohesie <rohesie@gmail.com>
2020-09-21 02:23:38 +01:00
Iamgoofball
a3aa69701a [READY] Basically, Instant Explosions 2: The Search For More Money: Eternal: A Tail Of Two Kitties: 33 1/3 (#50594)
About The Pull Request

Extools maptick stuff is in the game. Stolen from BeeStation/BeeStation-Hornet#1119, improves performance. Requires ex-tools on the server, though.

Explosions have been refactored to do the actual exploding in a subsystem.

Credit to goon.

Here's some videos!

Why It's Good For The Game
Basically instant max-caps now.
We can now give more of a tick over to the sending of map updates

Changelog

cl Goonstation Coders, Beestation, Extools devs
refactor: Explosions have been heavily optimized.
/cl
2020-04-30 10:27:53 +12:00
Couls
971ef6a416 Custom movement hotkeys and restore macros for T, O and M (#47626)
* Custom movement hotkeys and restore macros for T, O and M

* stray comma

* update movement keys on SSinput initialize

* use cardinals
2019-11-07 18:07:17 -05:00
Couls
070bb5e69c Port Custom hotkeys from TGMC (#47003)
* custom keybindings

* Update _lists.dm

* Update robot.dm

* modify weights and clean up some vars

* Update say.dm

* Apply suggestions from code review

Co-Authored-By: Emmett Gaines <ninjanomnom@gmail.com>

* some review changes

* formatting

* include focus hack, remove me_wrapper, give default keybinds to new characters, misc fixes

* revert hack and more reviews

* remove another focus hack

this was causing issues with the keydown proc returning early
2019-11-03 01:35:30 -07:00
kevinz000
c6d710d40e VV refactors 2 - Actually not indefinitely WIP (#45217)
About The Pull Request

The thing other than ruining maps that I was working on
Refactors VV to use a more standard way of doing topic dropdown options rather than a huge if/else chain
Marking datums is now a right click option
Moves a few files around too/few procs
Why It's Good For The Game

Makes it easier to add more VV dropdown options in the future, and moving href list keys to defines make misspelling them harder.
Changelog

cl
add: Oh yeah also added a "return value of proccall" option for VV var editing.
refactor: View Variables has been refactored. It should now be easier to make VV dropdown options.
/cl
2019-08-03 14:43:26 +12:00
ninjanomnom
53ffc71655 make fire priority values defines 2018-01-17 02:57:14 -05:00
Kyle Spier-Swenson
fa136e71f4 Revert "Merge pull request #33537 from ninjanomnom/priority-defines" (#34528)
This reverts commit 0244b61886, reversing
changes made to 5d07df08ea.
2018-01-16 20:04:35 -05:00
Emmett Gaines
d040afd6d0 Moves GLOB.movement_keys into SSinput and adds movement direction badminry (#34123)
* badmin flip dirs

* moves movement_keys into SSinput from GLOB
2018-01-14 20:37:59 +01:00
tortellinitony
2fcdcafced Makes a hotkey for asay 2018-01-08 17:55:18 -05:00
Emmett Gaines
4ec09a0c19 Re-Support old hotkey mode behaviour (#33460)
* supports old hotkey mode behavior

* testmerge fixes
2017-12-17 15:35:47 +13:00
ninjanomnom
a65248928b defines all subsystem priority values 2017-12-15 15:16:31 -05:00
Jordan Brown
878ea3676d SSinput tweaks to address server side lag 2017-12-13 16:22:50 -05:00
ninjanomnom
7b7b67edd8 In-code key handling system 2017-11-30 07:40:27 -05:00