Skip to content

Latest commit

 

History

History
9 lines (7 loc) · 489 Bytes

interdependencies.md

File metadata and controls

9 lines (7 loc) · 489 Bytes

There are a lot of cyclic dependencies in Doom.

Thinkers maintain pointers to each other so that they can be iterated over in O(n) time where n is the number of Thinkers actually active. The linked list was required in Doom due to the way the allocations work.

Thinkers that are map-objects generally maintain a pointer to a subsector they reside in. The subsector also maintains a pointer to a Thinker, and each Thinker maintains a pointer to others forming yet another linked list.