• Advertisement
Sign in to follow this  

The State Pattern

This topic is 2757 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

Quote:
Original post by Sambori
Patterns can greatly help setting up an object oriented game framework that can be used in different genres. Regardless of the AI used or the presentation of various in game objects, the design should scalable and maintainable.


You're doing it wrong!

This type of mentality is exactly backwards from the intended usage of patterns, which is largely the reason they have gained a bad reputation with experienced developers.

The idea of patterns was to develop a shared vocabulary to simply describe commonly-used techniques employed to solve specific problems. This mentality suggests that you are looking at a design and asking what patterns are applicable, which often results in bloated and overly-complex codes.

That's not to say that you shouldn't use a state pattern or a factory pattern, but rather that your decision to use such a pattern should be because that's what solves the problem correctly. The fact that it is a pattern is incidental to your decision.


Quote:
Original post by Antheus
Quote:
all the examples I found in pattern books and tutorials are plain simple and superficial.
Because that is all patterns are.



QFE. The reason all the pattern examples in those books seem simple and superficial is because they are. The reason why they are is because patterns are a descriptive language for programming techniques, not a how-to coding cookbook.

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by Sambori
LoL it's an Anti-Pattern pattern in some replies. But no I don't mean the Anti-Pattern pattern.


"Anti-patterns" isn't a pattern, its a phrase for describing a group of coding techniques that are generally considered to be bad. And you did not address any of the actual points in the posts that you think are "anti-pattern." I'm not sure what you plan to accomplish by posting "Lol anti-patterns," other than stating "Patterns good!"

Its still the case that you are using patterns in the wrong manner by taking patterns and looking for a problem to solve with them, rather than vice-versa.

Share this post


Link to post
Share on other sites
Show some respect dude. Don't ever underestimate others' abilities and expertise.

"Prejudice Pattern"

"Nerdy Talk Pattern"

"Academia Obsession Pattern"

"Needless Enthusiasm Pattern"

Avoid such an attitude at interviews. This will never get you a job in the software industry.

Share this post


Link to post
Share on other sites
Antheus, lets see here what you have

"And anal sex is great because it works on all genders."

Watch your words. You are not arguing with your bitch here. This is a professional forum and keep on mind that many people are highly professional and older than you. So show some respect.

"Abstraction over what? Plugs into what? What does this have to do with AI
or rendering?"

If you understand the main principles of object oriented paradigm, the design patterns are just a way to apply those principles to various problems, and all are centered around the principle of Abstraction - don't mix terms with something like ADT.


"Which is a big problem, since AI is all about flow of logic."

I'm talking about "patterns" not "AI" idiot!

Share this post


Link to post
Share on other sites
In an attempt to salvage the thread, all of us were just wondering what you meant when you kept saying "anti-patterns", because you didn't really elaborate beyond that and have been quite vague and a bit off-topic since you first mentioned them. There is a standard definition for anti-pattern, is that what you're referring to? If so, could you expand a little on where you see them?

Share this post


Link to post
Share on other sites
Quote:
Original post by Sambori
Watch your words. You are not arguing with your bitch here. This is a professional forum and keep on mind that many people are highly professional and older than you. So show some respect.


I have a funny feeling that Antheus may have more professional experience than you.

Share this post


Link to post
Share on other sites
Quote:
Original post by Sambori
Antheus, lets see here what you have

"And anal sex is great because it works on all genders."

Watch your words. You are not arguing with your bitch here. This is a professional forum and keep on mind that many people are highly professional and older than you. So show some respect.


I don't see where he offended you.

The point as I understood it: Some people like anal sex, some don't, some are gay, some are hetero, some are bi, and so on. But simply because anal sex and other anal practices fit everyone physically does not mean that everybody must like it and that it's appropriate in every sexual situation (e.g. it is not appropriate to make children, or when the partner does not like it).

But maybe that's the german in me. Germans can be unsound sometimes, but the English and French can, too. Dunno what Antheus is. Ever seen Braveheart? Netherlands are not bad, also. Heh, don't take it personally.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement