|
|
# Main loop
|
|
|
Calls:
|
|
|
- [TryRunTics](#tryruntics)
|
|
|
- COM_BufTicker
|
|
|
- D_MapChange
|
|
|
- [G_Ticker](#g_ticker)
|
|
|
- G_CopyTiccmd
|
|
|
- [P_Ticker](#p_ticker)
|
|
|
- [P_RunThinkers](#p_runthinkers) (also called twice in P_LoadLevel by P_PreTicker)
|
|
|
- various other tickers
|
|
|
- D_Display
|
|
|
|
|
|
Main loop consists of parts:
|
|
|
|
|
|
- Input polling is special: it is part of [NetUpdate](#netupdate), which has calls scattered around the code to improve responsiveness when the game is running slowly.
|
|
|
- Game logic: [TryRunTics](#tryruntics)
|
|
|
- If other code (like rendering) has taken too long, multiple tics can be run to compensate and keep the speed of the game consistent.
|
... | ... | @@ -20,6 +11,18 @@ Main loop consists of parts: |
|
|
- Sounds: S_UpdateSounds
|
|
|
- LUA GC: LUA_Step
|
|
|
|
|
|
Calls:
|
|
|
|
|
|
- [TryRunTics](#tryruntics)
|
|
|
- COM_BufTicker
|
|
|
- D_MapChange
|
|
|
- [G_Ticker](#g_ticker)
|
|
|
- G_CopyTiccmd
|
|
|
- [P_Ticker](#p_ticker)
|
|
|
- [P_RunThinkers](#p_runthinkers) (also called twice in P_LoadLevel by P_PreTicker)
|
|
|
- various other tickers
|
|
|
- D_Display
|
|
|
|
|
|
# TryRunTics
|
|
|
Calls:
|
|
|
- COM_BufTicker
|
... | ... | @@ -46,7 +49,12 @@ Calls: |
|
|
- hud logic (not much)
|
|
|
|
|
|
# NetUpdate
|
|
|
|
|
|
- when game is running fast enough, it will get run inside TryRunTics?
|
|
|
- when game is running slowly, it will also get run in various other places scattered in the code
|
|
|
|
|
|
Calls:
|
|
|
|
|
|
- Local_Maketic
|
|
|
- I_OsPolling
|
|
|
- D_ProcessEvents
|
... | ... | @@ -60,10 +68,6 @@ Calls: |
|
|
- M_Ticker
|
|
|
- CON_Ticker
|
|
|
|
|
|
NetUpdate:
|
|
|
- when game is running fast enough, it will get run inside TryRunTics?
|
|
|
- when game is running slowly, it will also get run in various other places scattered in the code
|
|
|
|
|
|
# P_Ticker
|
|
|
- Handles game world.
|
|
|
- Runs player thinking.
|
... | ... | |