- Game Development Patterns and Best Practices
- John P. Doran Matt Casanova
- 195字
- 2021-07-02 23:43:47
Summary
In this chapter, we have demystified a lot of programming concepts in a quick refresher. We also started learning about our first design pattern, the Singleton, which is intended to allow us to always have access to a class's functions and variables due to the fact that there will only ever be one of these objects.
We discussed some of the typical downfalls of using the Singleton pattern, such as the possibility that objects could have multiple copies of them in the future, even if this is unlikely.
We learned about three different kinds of method for creating Singletons, starting off with the Singleton, then extending it and templating parts of it to create the curiously reoccurring template pattern, and then we saw a final all-static version of getting the same effect with minimal hassle.
Each of these methods has their own pros and cons, and we hope that you use them effectively, where they are relevant. Now that we've touched on the design pattern everyone is familiar with, we can move towards our next challenge: learning about how to deal with logic that is specific to each of our inpidual games.
- Java系統分析與架構設計
- PHP基礎案例教程
- 青少年軟件編程基礎與實戰(圖形化編程三級)
- JavaScript+jQuery開發實戰
- 新編Premiere Pro CC從入門到精通
- MySQL數據庫管理與開發(慕課版)
- SQL Server 2016數據庫應用與開發
- 動手打造深度學習框架
- Sails.js Essentials
- Delphi開發典型模塊大全(修訂版)
- Implementing Microsoft Dynamics NAV(Third Edition)
- 征服C指針(第2版)
- Java EE實用教程
- Web前端測試與集成:Jasmine/Selenium/Protractor/Jenkins的最佳實踐
- ArcGIS Blueprints