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

Author Topic: How up to date are the books in the Learn section?  (Read 11658 times)

0 Members and 1 Guest are viewing this topic.

ChayHawk

  • Newbie
  • *
  • Posts: 10
    • View Profile
    • Email
How up to date are the books in the Learn section?
« on: February 12, 2021, 05:27:25 pm »
So it's been years and years and years since I last got into SFML. I think it was like SFML version 1.3 when i last tried it. I just got it working on VS 2019 and would like to buy some books but I see the books in the learn section were written in 2013-2017, are they still relevant to SFML's current release? like will i have a lot of trouble following them with the current version of SFML? if so, what books would you recommend?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10784
    • View Profile
    • development blog
    • Email
Re: How up to date are the books in the Learn section?
« Reply #1 on: February 13, 2021, 01:08:25 pm »
SFML 2.x hasn't changed as much. There are a bunch of (advanced?) features that you won't see mentioned in the books, but the basics of how to structure your application for a game and how to use the basic SFML classes, such as texture, sprite, vertex array, render window, etc. are all the same.

Beyond SFML, you may also run into some C++ code, that you could be doing a lot simpler with C++17.

Personally, I do recommend SFML Game Development, especially since I know the authors have been using SFML for a longer time when writing the book, but then again I haven't dug a lot into the other books to objectively judge.
(Side note: Ignore all the bits that explain how to use C++11 features without a C++11 compiler, you can directly use C++11 and even C++17 features these days :D )
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

ChayHawk

  • Newbie
  • *
  • Posts: 10
    • View Profile
    • Email
Re: How up to date are the books in the Learn section?
« Reply #2 on: February 14, 2021, 04:24:26 am »
So I got the SFML Game Development by example book, and I got the source code for it and there's like 72 errors in it, stuff like sf::color is declared deprecated and a lot of them about not being able to convert char[256] to Utils::LPWSTR so I have no idea, probably gonna take me forever to figure out how to fix it, not sure if its the code in the book or if i did something wrong, but eh, whatever i guess.

fallahn

  • Sr. Member
  • ****
  • Posts: 492
  • Buns.
    • View Profile
    • Trederia
Re: How up to date are the books in the Learn section?
« Reply #3 on: February 14, 2021, 12:06:22 pm »
My personal recommendation is, as eXpl0it3r said, SFML Game Development (not 'by example'). It concisely runs through a game project from beginning to end, and is written by authors who are on the SFML development team or closely associated with it, so, in my opinion, have a better understanding of SFML's design goals and how it is intented to be used.

sf::Text::setColor() has indeed been deprecated in favour of setFillColor() and setOutlineColor(). The deprecation notice should only be a warning (setColor() still exists for compatibility), however Visual Studio treats deprecation warnings as errors. To change the behaviour you can disable the warning.

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6286
  • Thor Developer
    • View Profile
    • Bromeon
Re: How up to date are the books in the Learn section?
« Reply #4 on: February 15, 2021, 12:55:30 pm »
For the book SFML Game Development, in case you look for the source code, it's available on GitHub:
https://github.com/SFML/SFML-Game-Development-Book
It's a bit unfortunate that Packt still doesn't provide an easily visible link to that repo.

Since SFML 2 has been written with backwards compatibility in mind, anything that you could do in SFML 2.0 (at the time of the book's release) is still possible with SFML 2.5. There may be some minor improvements like setFillColor(), but code shouldn't break.

(Disclaimer: I'm one of the authors of that book, so I won't recommend this one over the others)
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

Tank

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1486
    • View Profile
    • Blog
    • Email
Re: How up to date are the books in the Learn section?
« Reply #5 on: February 15, 2021, 07:38:04 pm »
(Disclaimer: I'm one of the authors of that book, so I won't recommend this one over the others)

Don't have false modesty, it's a good book. :-)

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6286
  • Thor Developer
    • View Profile
    • Bromeon
Re: How up to date are the books in the Learn section?
« Reply #6 on: February 15, 2021, 09:40:55 pm »
Thank you :)
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

 

anything