At last we will get to see some real graphics in our game. What we need to do is create a sprite. The first one we will create will be the game background. We can then draw it in between clearing the window and displaying/flipping it.
RenderWindow class allowed us to create our
window object to take care of all the functionality that our game's window needs.
We will now explore two more SFML classes, which will take care of drawing sprites to the screen. One of these classes, perhaps unsurprisingly, is called
Sprite. The other class is called
Texture. A texture is a graphic stored in memory on the Graphics Processing Unit (GPU).
An object made from the
Sprite class needs an ...