Seperating entities from their actions or behaviours

Posted by Jamie Dixon on Game Development See other posts from Game Development or by Jamie Dixon
Published on 2011-01-15T23:19:10Z Indexed on 2011/01/15 23:59 UTC
Read the original article Hit count: 497

Hi everyone,

I'm having a go at creating a very simple text based game and am wondering what the standard design patterns are when it comes to entities (characters, sentient scenery) and the actions those entities can perform.

As an example, I have entity that is a 'person' with various properties such as age, gender, height, etc. This 'person' can also perform some actions such as speaking, walking, jumping, flying, etc etc.

How would you seperate out the entity from the actions it can perform and what are some common design patterns that solve this kind of problem?

© Game Development or respective owner

Related posts about design-patterns

Related posts about text-based