Design Patterns
I''m curious as to what design patterns you have found useful to apply in your game engine. And what patterns should a game programmer look into and learn?
*checks the contents page from GoF)
Singleton
Pluggable factory (and, thus, factory)
Template
Visitor
Composite
Memento
Observer
State/Strategy
Superpig
- saving pigs from untimely fates, and when he''s not doing that, runs The Binary Refinery.
Enginuity1 | Enginuity2 | Enginuity3 | Enginuity4
ry. .ibu cy. .abu ry. dy. "sy. .ubu py. .ebu ry. py. .ibu gy." fy. .ibu ny. .ebu
Singleton
Pluggable factory (and, thus, factory)
Template
Visitor
Composite
Memento
Observer
State/Strategy
Superpig
- saving pigs from untimely fates, and when he''s not doing that, runs The Binary Refinery.
Enginuity1 | Enginuity2 | Enginuity3 | Enginuity4
ry. .ibu cy. .abu ry. dy. "sy. .ubu py. .ebu ry. py. .ibu gy." fy. .ibu ny. .ebu
client/server
Anything else is waste of time or poor programming skills.
Edit:
Also insert fancyname et al + pattern and scheme/ocaml/lisp and the size of your e-penis will turn exponential.
[edited by - Captian Goatse on October 11, 2003 1:05:14 PM]
Anything else is waste of time or poor programming skills.
Edit:
Also insert fancyname et al + pattern and scheme/ocaml/lisp and the size of your e-penis will turn exponential.
[edited by - Captian Goatse on October 11, 2003 1:05:14 PM]
quote:Original post by Captian Goatse
client/server
Anything else is waste of time or poor programming skills.
Thats a rather narrowminded and reactionary view.
I fancy factory and interface a whole lot. Typically, interfaces will be expressed as pure virtual classes in header files; concrete implementations go into one source file per class, including the class declaration of the concrete class at the top of the .cpp file.
Others that are nice include asynchronous queuing patterns (FIFO, workers and callbacks), systems/services, visitors (great for traversing scene graphs!), model/view/controller, and generic property trees.
Others that are nice include asynchronous queuing patterns (FIFO, workers and callbacks), systems/services, visitors (great for traversing scene graphs!), model/view/controller, and generic property trees.
Personally I use the Abstract Factory (very cool and easy and useful), the all beloved Singleton, I don''t know if "Interface" is actually a design pattern, but I use it too.
I haven''t gotten around yet on using Typelists with the Abstract Factory as described in "Modern C++ Design", it takes some time to grasp what is going on there. Template metaprogramming can make your head smoke
What''s a template pattern? Just using templates or what? I''d like to see some code that enlightens me about the Visitor pattern.
Baraclese
I haven''t gotten around yet on using Typelists with the Abstract Factory as described in "Modern C++ Design", it takes some time to grasp what is going on there. Template metaprogramming can make your head smoke
What''s a template pattern? Just using templates or what? I''d like to see some code that enlightens me about the Visitor pattern.
Baraclese
quote:Original post by Captian Goatse
client/server
That''s not a design pattern...
quote:
Anything else is waste of time or poor programming skills.
I think you''ve misunderstood what a design pattern is. How exactly does using a common solution to a frequent problem make you a poor programmer?
Superpig
- saving pigs from untimely fates, and when he''s not doing that, runs The Binary Refinery.
Enginuity1 | Enginuity2 | Enginuity3 | Enginuity4
ry. .ibu cy. .abu ry. dy. "sy. .ubu py. .ebu ry. py. .ibu gy." fy. .ibu ny. .ebu
Captian Goatse you obviously either misinterpreted exactly what a design pattern is, or your a complete idiot.
Any object orientated programmer worth his salt knows and uses tried and tested design patterns.
If your not yet sold, buy this book:
http://www.amazon.com/exec/obidos/tg/detail/-/0201633612/qid=1065914435/sr=8-2/ref=sr_8_2/102-3614532-0849762?v=glance&s=books&n=507846
You could definitely learn from it.
Any object orientated programmer worth his salt knows and uses tried and tested design patterns.
If your not yet sold, buy this book:
http://www.amazon.com/exec/obidos/tg/detail/-/0201633612/qid=1065914435/sr=8-2/ref=sr_8_2/102-3614532-0849762?v=glance&s=books&n=507846
You could definitely learn from it.
I have the book Design Patterns by the father of the singleton pattern. Anyhow, I''ve yet to see where design patterns actually help me.
I''ve not met a language that would force me to use singleton and if there is a language that is so incapable that I can''t brute force, I won''t use the language. As simple as that.
"Design patterns" are waste of time. It is cool if you get excited with them and they might be a nice hobby, but they are nothing practical.
Ok, I might have accidentally used some other design pattern, but common sense people!!
Common sense and pragmatic programming; no time wasted.
And please don''t call me an idiot if I don''t follow the modern trends.
I''ve not met a language that would force me to use singleton and if there is a language that is so incapable that I can''t brute force, I won''t use the language. As simple as that.
"Design patterns" are waste of time. It is cool if you get excited with them and they might be a nice hobby, but they are nothing practical.
Ok, I might have accidentally used some other design pattern, but common sense people!!
Common sense and pragmatic programming; no time wasted.
And please don''t call me an idiot if I don''t follow the modern trends.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement