Does anyone know where I can find “good” examples of abstract factory pattern as it would relate to game development specifically RPG game development? I’m not looking for things I can copy, but just for different examples that diagram various solutions to help me better understand how i would implement the abstract factory pattern in an text based rpg
Thank you ahead of time
Does anyone know where I can find good examples of abstract factory pattern as
Share
Here is an object-oriented MUD codebase in Lua…
Not sure if it uses an abstract factory but you could certainly take a look, might also be helpful to check out some other codebases.
An example that comes to mind is if you can create a character with a class (no pun intended), you could have a CharacterFactory, and RougeFactory and DruidFactory implementing CharacterFactory, each having a different implementation the attack() method.
The example given on Wikipedia,
http://en.wikipedia.org/wiki/Abstract_factory_pattern
can easily be adapted to suit a variety of RPG development situations.