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

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.

主站蜘蛛池模板: 新昌县| 屯留县| 聂荣县| 邯郸市| 合水县| 常宁市| 运城市| 宾阳县| 鄂尔多斯市| 海林市| 保定市| 枝江市| 钟山县| 繁峙县| 玉林市| 乌苏市| 盐城市| 周至县| 丰县| 广安市| 泾川县| 娱乐| 南漳县| 云梦县| 桂阳县| 达州市| 济源市| 当雄县| 耒阳市| 新兴县| 称多县| 油尖旺区| 法库县| 武安市| 无极县| 白水县| 封开县| 平远县| 偃师市| 伊春市| 永宁县|