Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Baraclese

Design Patterns

This topic is 5389 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
abstract factory pattern
singleton pattern
template pattern

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!