Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: another SFML book -- Beginning C++ Game Programming  (Read 10509 times)

0 Members and 1 Guest are viewing this topic.

jamesL

  • Full Member
  • ***
  • Posts: 124
    • View Profile
another SFML book -- Beginning C++ Game Programming
« on: October 20, 2016, 05:01:55 am »
I have a subscription to packtpub.
So I get to download pdf versions of their books.

I just a new SFML book that was just released.

https://www.packtpub.com/game-development/beginning-c-game-programming

from a quick look it seems to be geared towards new C++ programmers (explains variables, loops and so on - but doesn't seem very focused on the "newer" C++ stuff - smart pointers and the like - so it's more of a C with objects book)

you build a clone of
http://store.steampowered.com/app/398710/

and a very basic version of
http://store.steampowered.com/app/273500/

and also
http://store.steampowered.com/app/220780/

they get a little into shaders towards the end of the book

and here's the
Table of Contents

1: C++, SFML, VISUAL STUDIO, AND STARTING THE FIRST GAME
2: VARIABLES, OPERATORS, AND DECISIONS – ANIMATING SPRITES
3: C++ STRINGS, SFML TIME, PLAYER INPUT, AND HUD
4: LOOPS, ARRAYS, SWITCH, ENUMERATIONS, AND FUNCTIONS – IMPLEMENTING GAME MECHANICS
5: COLLISIONS, SOUND, AND END CONDITIONS – MAKING THE GAME PLAYABLE
6: OBJECT-ORIENTED PROGRAMMING, CLASSES, AND SFML VIEWS
7: C++ REFERENCES, SPRITE SHEETS, AND VERTEX ARRAYS
8: POINTERS, THE STANDARD TEMPLATE LIBRARY, AND TEXTURE MANAGEMENT
9: COLLISION DETECTION, PICKUPS, AND BULLETS
10: LAYERING VIEWS AND IMPLEMENTING THE HUD
11: SOUND EFFECTS, FILE I/O, AND FINISHING THE GAME
12: ABSTRACTION AND CODE MANAGEMENT – MAKING BETTER USE OF OOP
13: ADVANCED OOP – INHERITANCE AND POLYMORPHISM
14: BUILDING PLAYABLE LEVELS AND COLLISION DETECTION
15: SOUND SPATIALIZATION AND HUD
16: EXTENDING SFML CLASSES, PARTICLE SYSTEMS, AND SHADERS
17: BEFORE YOU GO...


mjtilbrook1

  • Newbie
  • *
  • Posts: 5
    • View Profile
    • Email
Re: another SFML book -- Beginning C++ Game Programming
« Reply #1 on: November 19, 2016, 05:28:11 am »
Rate this book out of 10?
also  do you recommend this over SFML Game Development?

jamesL

  • Full Member
  • ***
  • Posts: 124
    • View Profile
Re: another SFML book -- Beginning C++ Game Programming
« Reply #2 on: November 19, 2016, 11:26:05 am »
the books are for TOTALLY different audiences

if someone has never programmed then this book is better

chapter 2
2: VARIABLES, OPERATORS, AND DECISIONS – ANIMATING SPRITES

really does explain what a variable is and what operators are (not operator overloading, just operators) and how to do decisions (if / else statements)

this book truly is a beginner's programming book

if someone has never programmed in C++ then this book is much better
the entire first game (tree chopping game) is written without classes

it's not until chapter 6 and the 2nd game that he begins to introduce classes
he explains what classes are and the concept of Encapsulation, Polymorphism, Inheritance and public and private

the book is quite simple to get into and very fast to start creating things

compare that to the SFML Game Development where it has you making Entity classes, SceneNode classes and a generic ResourceHolder template for textures and Fonts before you even make your first game

you absolutely have to know C++ to even get started with the SFML Game Development book
and you have to be happy getting into a lot of background and theory and setup

its like if you wanted to learn to build a car
the Beginners book would have you building a simple working go kart in a couple of chapters

the Game Dev book would teach you how to build a more advanced go kart, but first it would teach you how to build some basic car parts and even give you some theory on why you make the parts that way

the result being I'm driving around having fun in my go kart while you're still learning how to paint yours

when you finally get yours finished will it be more solid than mine ?
yeah

but then you already knew the basics of auto mechanics before you started so you could jump into the more advanced stuff

but I didn't even know what a wrench is so I just wanted to learn the basics and get something up and running

that's really how these two books compare

the beginners book even has some pretty detailed pictures and instructions on setting up projects in Visual Studio

so yeah, if you're brand new to C++ or brand new to programming the Beginners book would be a 10

but if you've got some basic knowledge of C++ then you'll end up skipping so many pages
variables ?
if /else statements ?
classes ?

you already know all that
you'd probably think you wasted money on such a beginner's book

also, an experienced C++ programmer would be SO upset with the Beginners book treatment of pointers 
the Beginners book uses old C style pointers with new and delete

so a C++ programmer would probably give the Beginners book a 5 or maybe even a 3

they would be happy with the game examples and the explanations of SFML, but would be bothered by the lack of modern and advanced C++ features and all the time spent on the basics

I'd say the Beginners book would be better suited for anyone new to programming or even for someone with some experience in C or Python or javascript

but for someone with knowledge of C++ or familiar with another game library (like SDL) the Game Dev book might be better

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: another SFML book -- Beginning C++ Game Programming
« Reply #3 on: December 18, 2016, 05:17:07 pm »
Disclaimer: I'm an author of SFML Game Development (the first book about SFML). In our book, we deliberately made the choice to already expect solid C++ knowledge from a reader. This approach allowed us to focus on game development topics, without mixing it with language problems.

As such, I wonder why it is considered a good approach to teach both C++ and game development at the same time. C++ is one of the most complex programming languages, which takes months to years to learn properly. There are a lot of books about the C++ programming languages, only few of which are considered high quality in the community. All of them are huge (several hundred to a thousand pages), and they teach nothing but the language.

How can a book that has much fewer pages and intends to treat game development in addition to C++ be written in a way that doesn't miss out on many important topics? I'm really wondering, because in my opinion this is an unrealistic promise. But maybe I have misunderstood the intent.

Related: Is using SFML a good way to learn to program (in C++)?
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

K.F

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
    • Email
Re: another SFML book -- Beginning C++ Game Programming
« Reply #4 on: December 18, 2016, 11:45:51 pm »
As such, I wonder why it is considered a good approach to teach both C++ and game development at the same time.

It depends on why they want to learn C++ to begin with. Some people just want to learn it to make their dream game they always wanted to make, and that's the end of the their relationship with C++. If a book has all the knowledge they need to do that, then that's a valid learning choice for them.

Not everyone needs to learn every in and out of the language to use it. Although if someone wanted to become a professional programmer, there are better ways to learn for sure.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
another SFML book -- Beginning C++ Game Programming
« Reply #5 on: December 19, 2016, 01:50:57 am »
Unless your dream game is a pong clone, the C++ knowledge provided in such books is not sufficient enough to actually build that, besides that, pretty much everyone as a way too big dream game, that they'll never be able to implement alone within a reasonable timeframe and certainly not with just beginner knowledge in the programming language.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

K.F

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
    • Email
Re: another SFML book -- Beginning C++ Game Programming
« Reply #6 on: December 19, 2016, 09:35:04 am »
The book is about making 3 games according to op, so I see no reason to assume they won't learn anything significant. Plus, it is called "Beginning C++ Game Programming", it does not claim to be comprehensive, and once you learn the basics, it's much easier to research all other topics on your own.

Anyway, unless we read the book, we can't judge it wither way, it might be great beginner's book, it might be terrible and confusing, but the reviewers seem very happy with it.

 

anything