Skip to content

Dev: What is the difference between a Manager and a Controller?

Silent edited this page Feb 15, 2024 · 1 revision

All Manager classes are singleton objects that exist at package-level. They are initialized on-import and contain the global definitions for many important in-game elements such as Items, Entities, Rooms, and more. Notably, a Manager is responsible for defining logic to load these definitions from the game assets folders.

All Controller classes are instance-level objects that are usually embedded within an Entity. These objects track a specific aspect of an Entity such as its Inventory, Resources, Equipment, and more. Controller classes, unlike Manager classes, DO NOT load anything from disk.