|
|
# Main loop
|
|
|
Calls:
|
|
|
- TryRunTics
|
|
|
- [TryRunTics](#tryruntics)
|
|
|
- COM_BufTicker
|
|
|
- D_MapChange
|
|
|
- [G_Ticker](#g_ticker)
|
|
|
- G_CopyTiccmd
|
|
|
- P_Ticker
|
|
|
- P_RunThinkers (also called twice in P_LoadLevel by P_PreTicker)
|
|
|
- [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, which has calls scattered around the code to improve responsiveness when the game is running slowly.
|
|
|
- Game logic: TryRunTics
|
|
|
- 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.
|
|
|
- Graphics: D_Display
|
|
|
- Has special case for frozen netplay, which allows for moving the camera in that situation too
|
... | ... | @@ -25,9 +25,9 @@ Calls: |
|
|
- COM_BufTicker
|
|
|
- pending console command execution
|
|
|
- D_MapChange
|
|
|
- NetUpdate
|
|
|
- [NetUpdate](#netupdate)
|
|
|
- GetPackets
|
|
|
- G_Ticker
|
|
|
- [G_Ticker](#g_ticker)
|
|
|
- ExtraDataTicker
|
|
|
- netxcmd stuff
|
|
|
|
... | ... | @@ -36,7 +36,7 @@ Calls: |
|
|
- G_DoReborn (respawn)
|
|
|
- tickers for various game states (in level, intermission, cutscene etc.)
|
|
|
- in level:
|
|
|
- P_Ticker
|
|
|
- [P_Ticker](#p_ticker)
|
|
|
- ST_Ticker
|
|
|
- title card logic
|
|
|
- F_TextPromptTicker
|
... | ... | @@ -84,7 +84,7 @@ NetUpdate: |
|
|
- most precip logic is moved to rendering code with culling, but the current implementation still relies on some code running for every precip thinker
|
|
|
|
|
|
# P_MobjThinker
|
|
|
- Thinker function for all mobjs. Run for every mobj by P_RunThinkers, except for those with nothink.
|
|
|
- Thinker function for all mobjs. Run for every mobj by [P_RunThinkers](#p_runthinkers), except for those with nothink.
|
|
|
- Various checks and switch statements for the different mobj types in the game.
|
|
|
- Mobj states and actions.
|
|
|
- Movement physics.
|
... | ... | |