官术网_书友最值得收藏!

The problems with using design patterns in games

Unfortunately, there are also some issues that may come into play from using design patterns exactly as described. It's often said that the fastest executing code is the code that is never called, and using design patterns will typically require you to add more code to your project than what you would have done otherwise. This will have a performance cost as well, as there will likely need to be more calculations done whenever you're using a part of your engine.

For instance, using some principles will cause some classes that you write to become extremely bloated with extra code. Design patterns are another form of complexity to add to your project. If the problem itself is simple, it can be a much better idea to focus on the simpler solutions before going straight into implementing a design pattern just because you have heard of it.

Sometimes it's better to follow the simple rule of K.I.S.S. and remember that it is the knowledge of the pattern that holds the most important value, not using the pattern itself.

主站蜘蛛池模板: 金沙县| 云南省| 翁源县| 循化| 温州市| 太仆寺旗| 石林| 泸溪县| 田阳县| 新郑市| 丹东市| 博乐市| 塘沽区| 古蔺县| 中阳县| 青州市| 广元市| 建宁县| 达州市| 象山县| 临沭县| 周至县| 克什克腾旗| 喜德县| 中西区| 裕民县| 晋中市| 奉新县| 扶沟县| 焦作市| 郑州市| 开化县| 咸阳市| 合山市| 弋阳县| 建宁县| 绥滨县| 东宁县| 南和县| 山阳县| 格尔木市|