Chapter 2. Keeping Track of Your Textures – Resource Management

In the previous chapter, you have learned how to load a texture, and display a sprite that uses the texture. During the process of game development, you encounter such situations again and again: you need to load data from the hard disk, be it images, fonts, or sounds. This chapter intends to give you a broader understanding of the following points:

  • What is the motivation behind external resources
  • Which classes for resource handling and manipulation does Simple and Fast Multimedia Library (SFML) provide
  • What might a typical use case in a game look like
  • How do we cope with the constantly recurring need to manage resources in a simple way

Defining resources

In game development, the term ...

Get SFML Game Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.