O'Reilly logo

SFML Game Development by Henrik Vogelius Hansson, Artur Moreira, Jan Haller

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The loading screen – sample

While our example game does not use a loading screen up to this point, we have decided to provide a possible implementation of such a state. You can find its source code together with the sources of this chapter, as well as guide yourself through the following paragraphs into understanding it.

A loading screen is a state like any other, except for one thing; it performs a task in the background, using a parallel thread of execution. Using threads and understanding them in full is out of the scope of this book; however, SFML does provide sf::Thread, a cross-platform implementation for launching and managing multiple branches of execution in a program. Because of this, we will briefly introduce the use of sf::Thread and ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required