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

Summary

Over the course of this chapter we have learned about textures, co-ordinate systems, and fonts. We've learned some techniques that game developers use to put images and text onto the screen while maximizing performance, and we've actually gone and taken the first steps by drawing some images and writing some text to the screen.

By now you should know what DXT is and how to load these files from the disk using DirectXTK. You also know how to take these textures and draw them onto the screen with DirectXTK's SpriteBatch.

Don't forget that SpriteBatch offers a lot of benefits when you really get into drawing many things onto the screen, by batching the textures together for performance and offering sorting functionality so you can make the most of transparency.

Text rendering is a necessity for most games, and you now know how to take a font, pre-process it so you can save time at runtime, and write characters to the screen. We even covered how to apply a color tint to the text to make it more interesting.

You now know the basics of 2D rendering and are ready to apply them in making a game. There are plenty of other things you can do to make your game look awesome, so if you're interested in really pushing your 2D rendering skills, look around the many game development resources online and make some beautiful games.

Next steps

Now that we know how to get something onto the screen, we're ready to start turning this into a game. There are many more systems that contribute to the game, and the next chapter will cover some of them, with a heavy focus on getting some gameplay in there so we can take this from some static pictures to an interactive game.

主站蜘蛛池模板: 盐源县| 游戏| 黔西县| 三台县| 康保县| 武宁县| 嫩江县| 南阳市| 屏山县| 开远市| 乐都县| 云林县| 大化| 郧西县| 宝山区| 芦山县| 漳平市| 大同市| 尉氏县| 绥中县| 秀山| 鹤庆县| 元阳县| 嫩江县| 浮山县| 井冈山市| 铜川市| 阿拉尔市| 固镇县| 寻乌县| 万源市| 蒙阴县| 兴山县| 大同市| 祁东县| 文水县| 乌什县| 南城县| 晋中市| 龙门县| 宜君县|