- 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
- 用“芯”探核:龍芯派開(kāi)發(fā)實(shí)戰(zhàn)
- Cortex-M3 + μC/OS-II嵌入式系統(tǒng)開(kāi)發(fā)入門與應(yīng)用
- INSTANT Wijmo Widgets How-to
- 平衡掌控者:游戲數(shù)值經(jīng)濟(jì)設(shè)計(jì)
- 計(jì)算機(jī)維修與維護(hù)技術(shù)速成
- Large Scale Machine Learning with Python
- Source SDK Game Development Essentials
- WebGL Hotshot
- IP網(wǎng)絡(luò)視頻傳輸:技術(shù)、標(biāo)準(zhǔn)和應(yīng)用
- 嵌入式系統(tǒng)原理及應(yīng)用:基于ARM Cortex-M4體系結(jié)構(gòu)
- 計(jì)算機(jī)電路基礎(chǔ)(第2版)
- 計(jì)算機(jī)組裝與維護(hù)(慕課版)
- 創(chuàng)客電子:Arduino和Raspberry Pi智能制作項(xiàng)目精選
- 零基礎(chǔ)輕松學(xué)修電腦主板
- MicroPython Cookbook