官术网_书友最值得收藏!

Chapter 3. Into the Draw Thread

In this chapter, we are going to improve the rendering of sprites for our game. For this, we are going to use a custom GameView that will perform low-level drawing. We will make two different implementations: one that extends from View and another one that extends from SurfaceView. We will let DrawThread be a real thread, to work better with this GameView.

We will refactor the project, creating a Sprite class that will be used for all the items that are drawn in the game. We will draw bitmaps on a Canvas and learn about the transformation matrix used to do this.

To continue improving the game, we will add enemies. They will be a wave of asteroids moving towards our spaceship. For this, we will learn the concept of GameController and the different ways of doing it, from static to procedural level generation.

As part of the rendering techniques, we will learn about occlusion culling and parallax backgrounds, which we will use to make the game look nicer.

Finally, we will add support for layers in the engine.

主站蜘蛛池模板: 中宁县| 漠河县| 阿鲁科尔沁旗| 前郭尔| 丰县| 安徽省| 依安县| 望江县| 永福县| 政和县| 丽水市| 洛浦县| 香格里拉县| 五河县| 朝阳县| 白沙| 荔波县| 聊城市| 阿巴嘎旗| 六枝特区| 谷城县| 兴和县| 东兰县| 青冈县| 英吉沙县| 醴陵市| 固镇县| 荥经县| 皋兰县| 崇礼县| 十堰市| 龙陵县| 庄浪县| 五寨县| 吕梁市| 杭州市| 吉首市| 托里县| 皮山县| 孟村| 静海县|