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

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.

主站蜘蛛池模板: 娱乐| 平邑县| 涪陵区| 融水| 星子县| 瓦房店市| 德惠市| 斗六市| 兴宁市| 张家口市| 九寨沟县| 本溪市| 吕梁市| 上饶县| 莲花县| 新野县| 长垣县| 咸丰县| 文昌市| 庐江县| 额敏县| 蓝田县| 南宁市| 包头市| 开原市| 枣强县| 石狮市| 凯里市| 饶阳县| 青川县| 城市| 清徐县| 丰城市| 波密县| 襄城县| 文昌市| 大冶市| 兰考县| 民县| 萝北县| 辛集市|