Book Image

Mastering SFML Game Development

By : Raimondas Pupius
Book Image

Mastering SFML Game Development

By: Raimondas Pupius

Overview of this book

SFML is a cross-platform software development library written in C++ with bindings available for many programming languages. It provides a simple interface to the various components of your PC, to ease the development of games and multimedia applications. This book will help you become an expert of SFML by using all of its features to its full potential. It begins by going over some of the foundational code necessary in order to make our RPG project run. By the end of chapter 3, we will have successfully picked up and deployed a fast and efficient particle system that makes the game look much more ‘alive’. Throughout the next couple of chapters, you will be successfully editing the game maps with ease, all thanks to the custom tools we’re going to be building. From this point on, it’s all about making the game look good. After being introduced to the use of shaders and raw OpenGL, you will be guided through implementing dynamic scene lighting, the use of normal and specular maps, and dynamic soft shadows. However, no project is complete without being optimized first. The very last chapter will wrap up our project by making it lightning fast and efficient.
Table of Contents (17 chapters)
Mastering SFML Game Development
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface

Potential issues and how to address them


Although we aren't facing any of these issues at this very point, most 3D games will have to deal with them as soon as basic shadows are established using this method.

Shadow acne is a graphical artefact that can be summarized as horrible tearing, where lit areas are horribly defaced with dark and white lines closely nested together. This happens because shadow maps are of finite size and pixels that are right next to each other will end up spanning a small distance on actual, real geometry being shaded. It can be fixed by simply adding or subtracting a simple bias floating point value to or from the shadow map's depth sample inside the light pass shader. This floating point value would, ideally, not be a constant and instead depend on the slope between the point on the geometry and the light.

Peter panning can be described as shadows that appear to be floating away from the geometry that casts them. Adding the floating point bias to fix shadow acne...