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

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.

主站蜘蛛池模板: 永吉县| 丁青县| 蓝田县| 南澳县| 于田县| 澳门| 安龙县| 太保市| 汾阳市| 平利县| 延安市| 乐陵市| 湾仔区| 安图县| 阳山县| 阳城县| 宁晋县| 吐鲁番市| 肥城市| 普安县| 涡阳县| 上思县| 柘城县| 奉化市| 麻江县| 迁西县| 常宁市| 射阳县| 吉安市| 绥阳县| 桓仁| 奉贤区| 博白县| 张家界市| 舟山市| 乐平市| 当涂县| 漳浦县| 荃湾区| 澄城县| 青铜峡市|