Home › Per Nystrom (State pattern), modelling a charact…
Per Nystrom (State pattern), modelling a character with 'standing', 'jumping', 'ducking' behaviour uses which pattern?
AVisitor pattern over a node tree
BAdapter pattern for legacy APIs
CStrategy pattern for algorithms
DFinite State Machine (FSM) of behaviour
Answer & Solution
Correct answer: D. Finite State Machine (FSM) of behaviour
Nystrom Ch. State: each state is a class; transitions are explicit edges. Implements an FSM with one state object per state.
Related questions
Per Nystrom (Singleton chapter), Nystrom's view of the Singleton pattern in games is best 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 (Command pattern), a 'Command' object typically does which?Per Nystrom (Observer), the Observer pattern is also commonly known by which other name?