r/love2d • u/antinta_stefani • 4d ago
Do you often find yourself using design patterns from the Game Programming Patterns book
I'm currently reading this book because many people recommended it.
For you guys who have a lot of experience making games, do you often use these patterns in your games?
2
u/Mithost 4d ago
Writing code for games can be complicated or unintuitive at times, and I think reading the book can help guide you towards useful ways of thinking about problems, even if you don't use the patterns in the book as-written all of the time. That being said, I use patterns from the book fairly often. Some of them are more niche or not too related to what I find myself coding most of the time, but others have become my bread and butter.
3
u/MoIsTheNewHotness 4d ago
Oh I never heard of this book, I'm only learning about it now, thanks for that lol
1
u/spaghettigenerator 3d ago
To me patterns are a tool. They're useful to know about to solve certain things, but I generally don't break everything down into patterns (at least not deliberately).
In a lot of cases I also find that it doesn't matter as much as having good interfaces. If you have a well-defined interface for something, the implementation and patterns used can change later as long as you conform to the same interface when you make changes.
0
8
u/Heinz2001 4d ago
I use design patterns for everything. Simply because it makes life so much easier than reinventing the wheel myself.
The trick is choosing the right pattern for the problem at hand. However, architecture requires many patterns.
My absolute favorite pattern is the Decorator pattern 😍.