- 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.
- 觸摸屏實用技術與工程應用
- Windows phone 7.5 application development with F#
- 顯卡維修知識精解
- 極簡Spring Cloud實戰
- SDL Game Development
- Linux運維之道(第2版)
- The Applied AI and Natural Language Processing Workshop
- Machine Learning Solutions
- 筆記本電腦維修300問
- 電腦高級維修及故障排除實戰
- 超大流量分布式系統架構解決方案:人人都是架構師2.0
- 筆記本電腦維修實踐教程
- 基于PROTEUS的電路設計、仿真與制板
- Hands-On Deep Learning for Images with TensorFlow
- 微控制器的應用