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

  • SFML Game Development
  • Artur Moreira Henrik Vogelius Hansson Jan Haller
  • 224字
  • 2021-08-13 17:11:10

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.

主站蜘蛛池模板: 揭阳市| 潜山县| 双峰县| 贵定县| 眉山市| 沙洋县| 日照市| 象山县| 舒兰市| 固原市| 浠水县| 阿巴嘎旗| 巴彦县| 乐都县| 梅州市| 泰和县| 新源县| 凤台县| 丰台区| 绥德县| 平阳县| 滨州市| 山西省| 莆田市| 兴宁市| 苗栗县| 郁南县| 个旧市| 逊克县| 台东市| 靖边县| 南丹县| 香格里拉县| 海城市| 如东县| 济阳县| 上思县| 宜川县| 白河县| 玉树县| 三都|