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

Summary

We had to cover a lot of ground in this chapter. We have explained the most basic concepts that are required to create a game; concepts that you should always have present in order to save yourself from losing time in such issues, and instead, focus on making a great game.

In this chapter we:

  • Learned what SFML is, and what functionality it provides
  • Listened to input, and moved the player over several frames
  • Rendered an image to the screen
  • Learned about game loops and delta times, and saw the strengths and weaknesses of different approaches to handle time steps.

And if you are interested in how you would measure your FPS and render that to the screen, then have a look at the code base. We have implemented that functionality there, and it is based on the subjects we have already covered. We would recommend you try yourself; the only things you need are sf::Text and sf::Font in order to render text on the screen. You can learn more about these classes in SFML's API documentation at www.sfml-dev.org.

This concludes our introduction chapter. From now on we are going to investigate different aspects of SFML and game development in a more detailed manner. In the next chapter, we start with resource handling, which explains the backgrounds behind textures, fonts, and other resources.

主站蜘蛛池模板: 白城市| 耿马| 盐城市| 临夏县| 东乡县| 年辖:市辖区| 鄱阳县| 镇雄县| 广丰县| 枣阳市| 安吉县| 航空| 谢通门县| 犍为县| 梁山县| 方正县| 大英县| 锡林郭勒盟| 阳高县| 扬州市| 井研县| 邯郸县| 襄樊市| 万州区| 塔城市| 玉树县| 新化县| 咸阳市| 富顺县| 定襄县| 塘沽区| 潞城市| 德清县| 繁峙县| 维西| 双峰县| 津南区| 油尖旺区| 洛宁县| 会宁县| 醴陵市|