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

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.

主站蜘蛛池模板: 四会市| 沁水县| 柏乡县| 会宁县| 灌云县| 长子县| 德令哈市| 中西区| 忻州市| 西吉县| 沂源县| 武川县| 长岛县| 河东区| 海南省| 崇明县| 临夏市| 汝阳县| 建始县| 汉中市| 邢台县| 晋中市| 武汉市| 文昌市| 湖口县| 开封市| 福建省| 朝阳县| 台北县| 清原| 蓬溪县| 方城县| 清苑县| 马龙县| 西林县| 高唐县| 罗城| 南陵县| 新和县| 新宾| 兰州市|