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

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.

主站蜘蛛池模板: 和顺县| 都兰县| 南阳市| 凌源市| 道孚县| 大田县| 梅河口市| 当阳市| 弥勒县| 葵青区| 古浪县| 武定县| 阳曲县| 于都县| 黔西| 宾川县| 吉木萨尔县| 永新县| 渭源县| 洞头县| 镇安县| 双柏县| 固原市| 东平县| 池州市| 油尖旺区| 磴口县| 富锦市| 磐安县| 锦州市| 会泽县| 吉首市| 当涂县| 巴马| 昌乐县| 莆田市| 伊川县| 静海县| 南投县| 宁乡县| 新平|