Skip to content

Commit

Permalink
Merge branch 'master' of github.com:DaedalusDock/daedalusdock into pr…
Browse files Browse the repository at this point in the history
…oject/atlas
  • Loading branch information
Kapu1178 committed Aug 22, 2024
2 parents 5d5de5f + 216569b commit 3794847
Show file tree
Hide file tree
Showing 4,869 changed files with 537,952 additions and 1,199,011 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
6 changes: 4 additions & 2 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
# In the event that people are to be informed of changes
# to the same file or dir, add them to the end of under Multiple Owners

# Ebin-Halcyon
/icons/ @Ebin-Halcyon
# Francinum
/SQL/ @Francinum
/config/ @Francinum
rust_g.dll @francinum

# Kapu1178
/code/_DEFINES/atmospherics/ @Kapu1178
Expand Down
2 changes: 0 additions & 2 deletions .github/alternate_byond_versions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,3 @@
# Format is version: map
# Example:
# 500.1337: runtimestation

515.1603: runtimestation
40 changes: 0 additions & 40 deletions .github/guides/MAPS_AND_AWAY_MISSIONS.md

This file was deleted.

21 changes: 21 additions & 0 deletions .github/guides/TICK_ORDER.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The byond tick proceeds as follows:
1. procs sleeping via walk() are resumed (i dont know why these are first)

2. normal sleeping procs are resumed, in the order they went to sleep in the first place, this is where the MC wakes up and processes subsystems. a consequence of this is that the MC almost never resumes before other sleeping procs, because it only goes to sleep for 1 tick 99% of the time, and 99% of procs either go to sleep for less time than the MC (which guarantees that they entered the sleep queue earlier when its time to wake up) and/or were called synchronously from the MC's execution, almost all of the time the MC is the last sleeping proc to resume in any given tick. This is good because it means the MC can account for the cost of previous resuming procs in the tick, and minimizes overtime.

3. control is passed to byond after all of our code's procs stop execution for this tick

4. a few small things happen in byond internals

5. SendMaps is called for this tick, which processes the game state for all clients connected to the game and handles sending them changes
in appearances within their view range. This is expensive and takes up a significant portion of our tick, about 0.45% per connected player
as of 3/20/2022. meaning that with 50 players, 22.5% of our tick is being used up by just SendMaps, after all of our code has stopped executing. Thats only the average across all rounds, for most highpop rounds it can look like 0.6% of the tick per player, which is 30% for 50 players.

6. After SendMaps ends, client verbs sent to the server are executed, and its the last major step before the next tick begins.
During the course of the tick, a client can send a command to the server saying that they have executed any verb. The actual code defined
for that /verb/name() proc isnt executed until this point, and the way the MC is designed makes this especially likely to make verbs
"overrun" the bounds of the tick they executed in, stopping the other tick from starting and thus delaying the MC firing in that tick.

The master controller can derive how much of the tick was used in: procs executing before it woke up (because of world.tick_usage), and SendMaps (because of world.map_cpu, since this is a running average you cant derive the tick spent on maptick on any particular tick). It cannot derive how much of the tick was used for sleeping procs resuming after the MC ran, or for verbs executing after SendMaps.

It is for these reasons why you should heavily limit processing done in verbs, while procs resuming after the MC are rare, verbs are not, and are much more likely to cause overtime since theyre literally at the end of the tick. If you make a verb, try to offload any expensive work to the beginning of the next tick via a verb management subsystem.
8 changes: 8 additions & 0 deletions .github/images/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Attributions

## Badges
`built-with-resentment.svg` and `contains-technical-debt.svg` were originally sourced from https://forthebadge.com/, with the repository located at https://github.com/BraveUX/for-the-badge. `made-in-byond.gif` is a user-generated modification of one of these badges provided by this service.

## Comics

Both comics are sourced from https://www.monkeyuser.com/, which gives permission for use in non-profit usage via https://www.monkeyuser.com/about/index.html. `bug_free.png` can be found at https://www.monkeyuser.com/2019/bug-free/, and the original version of `technical_debt.png` can be found at https://www.monkeyuser.com/2018/tech-debt/ (the version found in the folder has been modified).
30 changes: 30 additions & 0 deletions .github/images/badges/built-with-resentment.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 32 additions & 0 deletions .github/images/badges/contains-technical-debt.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/images/badges/made-in-byond.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/images/comics/106-tech-debt-modified.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/images/comics/131-bug-free.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions .github/workflows/autowiki.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:
echo "::set-output name=SECRETS_ENABLED::$SECRET_EXISTS"
- name: Checkout
if: steps.secrets_set.outputs.SECRETS_ENABLED
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Restore BYOND cache
if: steps.secrets_set.outputs.SECRETS_ENABLED
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ~/BYOND
key: ${{ runner.os }}-byond-${{ secrets.CACHE_PURGE_KEY }}
Expand Down
Loading

0 comments on commit 3794847

Please sign in to comment.