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

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.

主站蜘蛛池模板: 宝清县| 扎兰屯市| 德江县| 禹州市| 攀枝花市| 中阳县| 齐齐哈尔市| 二连浩特市| 娄底市| 江口县| 阳东县| 英山县| 孝昌县| 霞浦县| 土默特右旗| 房山区| 宝坻区| 昭苏县| 尚义县| 文山县| 松溪县| 铁力市| 武定县| 柳河县| 雷山县| 万山特区| 新津县| 辽阳县| 水城县| 仁布县| 安义县| 鄯善县| 辉县市| 扶风县| 肇源县| 阜南县| 桂阳县| 定边县| 澳门| 饶河县| 绥阳县|