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

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.

主站蜘蛛池模板: 婺源县| 闽侯县| 米脂县| 安国市| 郎溪县| 诏安县| 西盟| 岚皋县| 柞水县| 灯塔市| 朔州市| 板桥市| 福贡县| 平潭县| 邹平县| 吐鲁番市| 南木林县| 新郑市| 建水县| 边坝县| 会昌县| 托克逊县| 鸡西市| 宜都市| 卓尼县| 抚松县| 株洲市| 财经| 万荣县| 通州区| 龙井市| 依安县| 公安县| 宜章县| 乐至县| 纳雍县| 略阳县| 舟曲县| 兴义市| 武宣县| 康乐县|