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

Author Topic: [c++] What is, in your opinion, the best way to learn SFML  (Read 1039 times)

0 Members and 1 Guest are viewing this topic.

jonalbert

  • Newbie
  • *
  • Posts: 1
    • View Profile
[c++] What is, in your opinion, the best way to learn SFML
« on: June 07, 2020, 10:02:09 pm »
Hello, I have tried Codingmadeeasy and a tutorial to make a game with sfml, but it feels as if i am more copying then making my own code. If you have any good sources please link them. Thank you for the help in advance


Paul

  • Jr. Member
  • **
  • Posts: 79
    • View Profile
Re: [c++] What is, in your opinion, the best way to learn SFML
« Reply #1 on: June 07, 2020, 11:25:20 pm »
Check SFML tutorials on main web site how to use framework correctly (it's described very well) and try to make simple games like Pong from scratch. Only with C++ & SFML documentation. That's the only way how to learn.


eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10801
    • View Profile
    • development blog
    • Email
Re: [c++] What is, in your opinion, the best way to learn SFML
« Reply #2 on: June 08, 2020, 01:50:16 pm »
What a lot of video creators and video consumers don't seem to grasp, is that in order to learn something, you actually have to understand it. So I think you're on the right path to notice, that typing someone else's code or copy pasting it from somewhere, isn't very effective in learning its meaning.
I can second Paul's suggestion of trying to build clones of classic games such as Pong, Tic Tac Toe, Tetris, etc. while going through the official tutorials.
And again, don't just copy the code and try to move pieces around until it maybe works, but actually understand what the parameters mean and why you need to create a window and what events do and how to apply the clear(), draw(), display() steps, etc.
If you're new to C++ as well, it will be a bit harder to understand these concepts, that's why we usually suggest to learn the basics of C++ without SFML.

After you've understood the basics of SFML, I can recommend the SFML Game Development book, which will give you some more tips on how to structure a game, among other things.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/