Having the ability to render to
sf::RenderTexture and store the results opens up a world of possibilities. One of these is combining multiple sprites to create new, more versatile ones. We can draw to an
sf::RenderTexture class multiple times, and the sprites will overlap. This is an incredibly useful technique that can be used to generate a vast amount of sprite variations without all the work. This is shown in the following screenshot:
Using this approach, we'll create random armor for our enemies. We'll have three pieces of armor; head, torso, and legs. For each of these, we'll also have three variations; bronze, ...