Home › Per Nystrom (Singleton chapter), Nystrom's view …
Per Nystrom (Singleton chapter), Nystrom's view of the Singleton pattern in games is best summarised as which?
ASafer than the Service Locator pattern
BAlways use it for game manager classes
CAvoid it; introduces hidden coupling
DRequired by every modern game engine
Answer & Solution
Correct answer: C. Avoid it; introduces hidden coupling
Nystrom Ch. Singleton (a critique): hidden globals, hostile to testing, life-cycle issues. Service Locator is the preferred substitute.
Related questions
Per Nystrom (Service Locator), the Service Locator pattern provides which feature?Per Nystrom (Spatial Partition), structures like quadtrees / BVH speed up which game operaPer Nystrom (Event Queue), queueing events between producer and consumer DECOUPLES them inPer Nystrom (Double Buffer), separating current vs next-frame state prevents which artifacPer Nystrom (Object Pool), reusing pre-allocated objects instead of new/delete each frame Per Nystrom (State pattern), modelling a character with 'standing', 'jumping', 'ducking' bPer Nystrom (Command pattern), a 'Command' object typically does which?Per Nystrom (Observer), the Observer pattern is also commonly known by which other name?