SFML community forums
Help => General => Topic started by: jonalbert 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
-
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.
-
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 (https://www.sfml-dev.org/tutorials/2.5/).
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.