I made this thread to ask exactly what and how to make a class file for a game that controls all of the different screens and events. I'm still somewhat new to programming and game making so I've been watching a few game making tutorials in C++ but all they do is tell you EXACTLY how to put the code in without exactly teaching you what it does and how it works, that's a problem as I don't want to just make a game by copying someone else's exact code, I'd rather then just get his/her source code for his/her game engine. I wish to learn what all the processes in the code are doing or at least the basics.
I wish to make a 2D Platformer using SFML as my API if that helps at all.