Jump to ratings and reviews
Rate this book

SFML Game Development

Rate this book
If you've got a firm grasp of C++ with a secret hankering to create a great game, this book is for you. Every practical aspect of programming an interactive game world is here - the only real limit is your imagination. Overview In Detail Game development comprises the combination of many different aspects such as game logics, graphics, audio, user input, physics and much more. SFML is an Open Source C++ library designed to make game development more accessible, exposing multimedia components to the user through a simple, yet powerful interface. If you are a C++ programmer with a stack of ideas in your head and seeking a platform for implementation, your search ends here. Starting with nothing more than a blank screen, SFML Game Development will provide you with all the guidance you need to create your first fully featured 2D game using SFML 2.0. By the end, you'll have learned the basic principles of game development, including advanced topics such as how to network your game, how to utilize particle systems and much more. SFML Game Development starts with an overview of windows, graphics, and user inputs. After this brief introduction, you will start to get to grips with SFML by building up a world of different game objects, and implementing more and more gameplay features. Eventually, you’ll be handling advanced visual effects, audio effects and network programming like an old pro. New concepts are discussed, while the code steadily develops. SFML Game Development will get you started with animations, particle effects and shaders. As well as these fundamental game aspects, we’re also covering network programming to the extent where you’ll be able to support the game running from two different machines. The most important part, the gameplay implementation with enemies and missiles, will make up the core of our top-scrolling airplane shoot' em-up game!. You will learn everything you need in SFML Game Development in order to start with game development and come closer to creating your own game. What you will learn from this book Approach SFML Game Development is a fast-paced, step-by-step guide, providing you with all the knowledge and tools you need to create your first game using SFML 2.0

296 pages, Paperback

First published June 1, 2013

11 people are currently reading
40 people want to read

About the author

Jan Haller

2 books

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
10 (29%)
4 stars
16 (47%)
3 stars
4 (11%)
2 stars
3 (8%)
1 star
1 (2%)
Displaying 1 - 9 of 9 reviews
1 review1 follower
Read
November 4, 2013
Review: SFML Game Development

Review

With 296 pages very well written, "SFML Game Development", written by Arthur Moreira, Vogelius Henrik Hansson and Jan Haller is a new book published by Packt that teaches (and without intimidating) on the popular media library, SFML 2.

With several code examples, illustrations, flow charts and very explaining texts, it was an enjoyable read, and even for me, who's very familiar with SFML API and game development environment, was able to learn a little more after reading it.

For me, this book is a "must-have" if one has never played with SFML or got involved with game development, whith it you'll be able to catch up with it quickly, and also with a production-ready library. SFML was the first media library that I used with C++, so, it is important to review a book like this.

But in the ol'days this book still didn't exist, and even though I'm almost sure I would not have bought it ('cause I didn't had international card at the time). But it would be very handy and would save several hours of research, since it covers even the networking bit of SFML, and probally would help some of my friends to catch up to my "level" faster, either way, during te researchs I learned much more C++11 than this book teach anyways, not to mention that at that time I had much more time to research, but whatever.

Well, getting back to the book, it is very well structured, has a good presentation at the beginning, and after a little more it starts explaining the basics of how to build a empty game with SFML running, and as the course of book, the game evolves and becomes into a full fledged topdown shooter, and not only that, the book even teaches how to implement online multiplayer co-op. So... the book covers all SFML2 API fractions, oh, almost forgot, it also teaches a bit about some new features of C++11, but this wasn't the focus of the book, or of who bought it anyway.

tl;dr: It's a pretty hasty book to read, covers SFML2 entirelly, is very cheap and very well written. Recommended, buy here.



Book Summary

The book is well structured, in the beginning, it has a good introduction, some brief words of the original author of SFML, telling about the history of SFML and on some facts about the 2nd release of it, then, after that, the presentation of the authors and reviewers and then the game begins :D.

The book has 10 chapters, each one covering a fraction of the game development, noting that the book has a good support material, which you can download from Packt.

In the first chapter, it gives a good introduction on how to use SFML, including download, installation, warnings about the used version of C++ and the basics of the API, at the end of this chapter we get an empty game with constant FPS running.

Then, in the second chapter, the game receives a resource loader, the book teaches how to optimize the loading of textures and some other things, so the game will not waste time reloading what was loaded already, it also teaches to release resources from memory and also on how to handle a common situation: the lack of a resource in the game. Oh, almost forgot, it talks a little about shaders, and is very interesting to you to know that SFML already comes with built in support for GLSL shaders.

In the third chapter, the game starts to get more shape, then we began to create it's objects, graphics, game logic, organization and structuring. I have to say that for those who know C++, but never created any game, this is the most interesting part of the book, because that is what defines how enjoyable the game development will be, and how fast the game will run, the more you engage in doing this part well, the faster/"stabler" your game will get.

Moving on to the fourth chapter, the book teaches you to manage user input, detect the pressing of buttons and etc. Falls between us, is not the most complicated part of a game development, but certainly should be at least well made, if you make a mistake here, player commands can be ignored or given a weird delay.

Now, in chapter 5, the book explains about state/scene control. To understand this better, most games do not have only one "screen", a game typically has multiple "screens", now think that each stage of a game possesses at least one "screen" and something is programmed to manage which screen is running. That's what this chapter teaches you to do, and I messed a lot when I was doing this for the first time in C++, if you have this book in hand, will certainly be less painful than it was for me.

Chapter 6 teaches how to make GUIs, it is very shallow and the subject sucks, but it is necessary, and also, if the book were deeper here, it would need to be divided into two volumes, much larger than it currently is.

Now, in chapter 7, some important elements of gameplay are implemented, the text that appears on the screen, the HP character. Enemies and projectiles are also created in this chapter. The coolest part of this chapter is to make the homing missiles and collision detection.

Giving a little more beauty to the game, chapter 8 teaches about special effects, particle systems, animating sprites and some complicated things like texture atlas, shaders and OpenGL, one of the three most interesting parts of the book (the others being state/scene management and networking). From what I remeber, most programmers are not good at making things beautiful, and many people have a hard time to implement shaders and particle systems, so read this chapter, READ IT.

Getting a bit closer to the end of the book, in chapter 9 songs and sound effects begin to play, a litle about it's loading is taught, it is worth remembering that the book teaches how to use 3D sound effects, I never even had time to stop and read on the subject, which makes the chapter a little more interesting, after that the game is practically ready, just missing a little detail...

The online multiplayer, which is explained in the final chapter, so very complete. As I said, this was the part that interested me most in the book, because I had no idea how to prepare everything, down to the separate thread I have ever had in idea but did not know how to implement, and even not using more the SFML, the last chapter certainly gave me a good foundation for when I implement multiplayer to my game, and also taught me some new tricks.



Conclusion...

If you want to create games with C++, but do not know where to start, start with SFML, and get this book in hand :D. Moreover, even if not with SFML, having this book will help a lot because you can apply the same logic you'd learned in it in many other popular libraries (unless, of course, you already know everything).

This was my first public book review, also first multilingual review, so forgive me for writing any weird things.

Profile Image for Shayan aminnjad.
99 reviews2 followers
June 29, 2017
If you want to learn how to make video games, using C++ and also SFML, this book is a great book to read. It will teach you how to work with SFML, a bit of C++11 and some design patterns.
However, you should know that this is not a book for beginners. To understand the book you'll need to know C++ syntax perfectly, and also you should read at least "Effective C++" and "Effective modern C++" by Scott Meyers. But still, you have to consider that this book is only an introduction to making video games! You have to read much more to be a game developer.
Profile Image for Omar Khodr.
12 reviews
April 24, 2024
Stopped at Chapter 4. Decent enough introduction, though I can't recommend it. The codebase became more and more convoluted, and the writing quality is inconsistent.
6 reviews
October 11, 2022
This is my first forray into game engine development so bear in mind it is from a relatively beginner standpoint. However the reason for my low rating is that despite clear explanations of SFML's features and how to generate code their example code base is ATROCIOUS. It is littered with a maze of class structures and utilization of OOP techniques that really don't make any sense. The book has strong points it is well written and it is obvious the author knows their stuff. I got to chapter 5 (~halfway) and decided to put it down. My suggestion is to use this as a guide for SFML features but not rely on their codebase.
Profile Image for Elias Daler.
31 reviews6 followers
January 21, 2018
This book is must-read for anyone starting game development. It shows you how to avoid lots of mistakes beginners make and how to make easily maintainable and readable code. It's really well-written and even taught me a lot of useful stuff (I wasn't a beginner when I first read this book).
1 review1 follower
August 8, 2019
this book is not for beginners

you must have a good experience with c++ before reading this book ;

Profile Image for François Lebeau.
6 reviews
January 7, 2017
The information given in this book is great insight for a beginner. It's sad that the code written for the example game is average at its best times, and just plain bad at its worst. I found it also very disappointing that it did not even touch the notion of tile-based games (platformers). They leave out so many concepts that have been the bread and butter of games for decades (tile-based maps/movement, terrain collision handling, etc.).
Profile Image for Sebastián Bravo.
2 reviews1 follower
October 16, 2014
Además de utilizar SFML, enseña conceptos básicos y patrones típicos utilizados en el desarrollo de juegos.
Displaying 1 - 9 of 9 reviews

Can't find what you're looking for?

Get help and learn more about the design.