- Hands-On Game Development with WebAssembly
- Rick Battagline
- 175字
- 2021-06-24 13:41:11
Summary
In this chapter, we learned how to create a basic game framework. We learned what a game loop is and how we create one for WebAssembly using Emscripten. We learned about game objects and created classes to define our player's spaceship, an enemy spaceship, and projectiles. We learned about object pooling, and how we can use an object pool to recycle objects in memory so that we do not need to create and destroy new objects in memory continually. We used this knowledge to create an object pool for our projectiles. We also created an AI stub for our enemy spaceship that gave that object random behavior, and we created functions that let our player and enemy shoot at each other while our projectiles pass harmlessly through the spaceships.
By the end of the next chapter, we will add collision detection; this will allow our projectiles to destroy the spaceships they hit, and add an animation sequence that will show a ship being destroyed when it is hit by one of the projectiles.
- Cortex-M3 + μC/OS-II嵌入式系統(tǒng)開發(fā)入門與應(yīng)用
- Linux運(yùn)維之道(第2版)
- BeagleBone By Example
- 電腦維護(hù)365問
- Learning Game Physics with Bullet Physics and OpenGL
- Spring Cloud微服務(wù)架構(gòu)實(shí)戰(zhàn)
- STM32嵌入式技術(shù)應(yīng)用開發(fā)全案例實(shí)踐
- 面向?qū)ο蠓治雠c設(shè)計(jì)(第3版)(修訂版)
- Building 3D Models with modo 701
- 微型計(jì)算機(jī)系統(tǒng)原理及應(yīng)用:國產(chǎn)龍芯處理器的軟件和硬件集成(基礎(chǔ)篇)
- IP網(wǎng)絡(luò)視頻傳輸:技術(shù)、標(biāo)準(zhǔn)和應(yīng)用
- 嵌入式系統(tǒng)設(shè)計(jì)大學(xué)教程(第2版)
- 計(jì)算機(jī)組裝、維護(hù)與維修項(xiàng)目教程
- 筆記本電腦的結(jié)構(gòu)、原理與維修
- 主板維修實(shí)踐技術(shù)