Common mistakes

One of the most common mistakes the newcomers make when it comes to SFML input is using certain methods of checking the user input for the wrong tasks, such as using the window events for real time character movement or capturing text input. Understanding the limitations of anything you use is the key to cultivating any kind of decent performance. Make sure to stick to the intended uses of all the different mechanisms we've discussed in order to achieve optimal results.

Another fairly common mistake people make is defining templates in the .cpp file instead of the header. If you are getting linking errors pertaining to a method that just so happens to utilize templates, such as the EventManager::AddCallback() method, make sure to ...

Get SFML Game Development By Example 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.