Skip to content

Game Programming Patterns

Mob Programming - 1 Anchor, others navigator Solution to solve Inheritance rules, is not more inheritance. Inheritance promotes Vertical reusability not horizontal reusability Using interfaces for similar kind of behaviours (UseWeaponBehaviour → SwordSwingingBehaviour, ArrowShootingBehaviour)

Advantages of Composition

  • Dynamic behaviour switch → Behavioural Design Pattern → Plug and Play → Runtime
  • Not breaking substitution
  • Horizontal method sharing
  • Code reusability

We can add behaviours dynamically Strategy Design Pattern → Behavioural Design Pattern Factory Design Pattern → Creation Design Pattern

On this page