Usage of Abstract Factory in Games

Hi all,

i am looking for Examples in Game Programming where the Abstract Factory Design Pattern can be used.

For a small School Project we have to explain the Pattern to the class.

And whats better than a graphical demonstration, so i thought.

But i can't come up with a small and easy to understand Example.

Most examples on the net cover the topic with the Look and Feel WidgetFactory or the famous Maze / Enchanted Maze.

So my Question is:

Did you ever use the Pattern in your game? And if so, for what Part of it?


The abstract factory pattern is used in jME Physics 2: Implementations of the PhysicsSpace class overwrite method to create the nodes and geometries.

But I think you should keep it way more simple. You really should not saddle your classmates with all the 3D stuff, just to have a nice looking example for the pattern.

of course i wouldn't explain it with the jME Example.

this would just be a demonstration on how it could be used in Games.