- Hands-On Game Development with WebAssembly
- Rick Battagline
- 249字
- 2021-06-24 13:41:09
Game Objects and the Game Loop
In this chapter, we will begin to put the framework of a game into place. All games have game objects and a game loop. A game loop exists in every game ever written. Some tools, such as Unity, do their best to abstract away the game loop so that the developer does not necessarily need to know it is there, but even in these cases it still is. All games must take some control over the rendering capabilities of the operating system or hardware it is running on and draw images out to the screen while the game is running. All of the work of the game is done within a big loop. Game objects can be either an instance of classes in the case of Object-Oriented Programming (OOP) languages such as C++, or in the case of procedural languages such as C, they could be loose collections of variables or structures. In this chapter, we will be learning how to design a game loop and some early versions of our game objects from within C++ compiled into WebAssembly.
In this chapter, we will cover the following topics:
- Game loops
- Object pooling
- Player game object
- Enemy game object
- Projectiles
- Aftershot Pro:Non-destructive photo editing and management
- 零點起飛學Xilinx FPG
- Instant uTorrent
- 電腦常見問題與故障排除
- Intel FPGA/CPLD設計(高級篇)
- Manage Partitions with GParted How-to
- 微服務分布式架構基礎與實戰:基于Spring Boot + Spring Cloud
- 計算機組裝與維修技術
- 單片機開發與典型工程項目實例詳解
- Istio服務網格技術解析與實踐
- 無蘋果不生活:OS X Mountain Lion 隨身寶典
- Wireframing Essentials
- 單片微機原理及應用
- 單片機原理與技能訓練
- 詳解FPGA:人工智能時代的驅動引擎