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

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.

主站蜘蛛池模板: 得荣县| 惠来县| 山阳县| 区。| 仁化县| 新和县| 兰西县| 定远县| 玉山县| 清远市| 漳平市| 海晏县| 五华县| 独山县| 沽源县| 唐海县| 榆社县| 阿瓦提县| 巴彦县| 玉树县| 武宁县| 彭山县| 通化县| 集安市| 偃师市| 彝良县| 宜阳县| 安义县| 新源县| 东乌| 寿阳县| 桂林市| 饶阳县| 枞阳县| 右玉县| 莒南县| 来宾市| 古田县| 桐庐县| 团风县| 二手房|