- 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.
- Instant Node Package Manager
- SpringMVC+MyBatis快速開發與項目實戰
- Spring技術內幕:深入解析Spring架構與設計
- 劍指Offer(專項突破版):數據結構與算法名企面試題精講
- Learn WebAssembly
- 小學生C++創意編程(視頻教學版)
- NoSQL數據庫原理
- IBM Cognos Business Intelligence 10.1 Dashboarding cookbook
- SQL Server實用教程(SQL Server 2008版)
- Getting Started with Python and Raspberry Pi
- Python從入門到精通(第3版)
- Raspberry Pi Blueprints
- JBoss AS 7 Development
- Elastix Unified Communications Server Cookbook
- Enterprise Application Architecture with .NET Core