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

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.

主站蜘蛛池模板: 万荣县| 莱芜市| 临澧县| 车致| 信丰县| 鹤岗市| 抚顺县| 巧家县| 玛多县| 南丹县| 沂南县| 鞍山市| 海淀区| 罗江县| 芜湖市| 屯门区| 长沙市| 康平县| 双峰县| 多伦县| 年辖:市辖区| 永德县| 武功县| 铅山县| 开江县| 东城区| 卫辉市| 洛扎县| 灵璧县| 稻城县| 麦盖提县| 慈利县| 皮山县| 海城市| 兴山县| 灌阳县| 称多县| 永新县| 大冶市| 自贡市| 酒泉市|