
SFML Game Development By Example
By :

Programming patterns, or design patterns, at they're more commonly referred to, are reusable and widely-implemented solutions to a given problem. That is not to say that these patterns exist as some sort of libraries out there, although there are libraries based on them. Instead, a programming pattern is more of an idea or a strategy. It is a well laid out plan on tackling a certain problem, the best possible answer to a given problematic situation, proven by time and experience, which is one of the the best reasons they should be used.
There are quite a few design patterns out there, as well as books, tutorials and even classes dedicated solely to understanding and implementing them. For our purposes, we're going to be covering four: the entity component system, event queue, observer and factory patterns. We'll be talking about each one separately, as they're non overlapping in function, even though they can be working together.
Change the font size
Change margin width
Change background colour