- Game Development Patterns and Best Practices
- John P. Doran Matt Casanova
- 215字
- 2021-07-02 23:43:43
The graphics engine
This book isn't about creating a graphics engine but we do need one to draw to the screen. Similar to how the M5App class encapsulates important OS function calls, our M5Gfx class encapsulates our graphics API. We want to make sure there is a clear separation between any API calls and our game logic. This is important so we can port our game to another system. For example, we may want to develop our game for PC, XBox One, and PlayStation 4. This will mean supporting multiple graphics APIs since a single API isn't available for all platforms. If our game logic contains API code, then those files will need to be modified for every platform.
We won't be going deep into the details of how to implement a full graphics engine, but we give an overview of how graphics works. Think of this as a primer to the world of graphics engines.
This class allows us manipulate and draw textures, as well as control the game camera and find the visible extents of the world. M5Gfx also manages two arrays of graphics components, one for world space and one for screen space. The most common use of the screen space components is for creating User Interface (UI) elements such as buttons.
- Java程序設計與開發
- GraphQL學習指南
- Mastering Python High Performance
- Programming with CodeIgniterMVC
- Java程序設計實用教程(第2版)
- Instant GLEW
- Python 快速入門(第3版)
- 計算機應用基礎(Windows 7+Office 2010)
- Java Script從入門到精通(第5版)
- 循序漸進Vue.js 3前端開發實戰
- Access 2016數據庫應用與開發:實戰從入門到精通(視頻教學版)
- HTML5+jQuery Mobile移動應用開發
- Python程序設計案例教程
- Flutter for Beginners
- 編程真好玩:從零開始學網頁設計及3D編程