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

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.

主站蜘蛛池模板: 临沭县| 中阳县| 乐亭县| 利辛县| 宽甸| 桐庐县| 永福县| 咸阳市| 弋阳县| 新平| 平和县| 五指山市| 舟曲县| 海城市| 桂东县| 广南县| 温泉县| 阜城县| 德惠市| 郑州市| 青川县| 大竹县| 石棉县| 嘉禾县| 乡城县| 应城市| 邵阳市| 吉木乃县| 中宁县| 绥德县| 惠水县| 连江县| 留坝县| 云和县| 曲周县| 张家界市| 桐城市| 古浪县| 宜都市| 榆社县| 焦作市|