Hi, I'm about to write my first game with SFML (I've used plenty c++ before) and I have a few question about how a game is ought to be designed.
I'm thinking of creating a game with a few different "modes/states" you can be in (eg. main menu, character creation, battle mode, map, dialog, options), so, at least to start with, you can't move your character around freely.
How is this best archived with SFML? Can I create some sort of layers with the different modes which can be activated, deactivated? Does all code that changes something on the program window have to be in the main "while (window.isOpen()){}", or can separate functions (that's not inside that loop) change the graphics/get events? Or can I somehow make a function that only handles the graphical output and is separated from the "main" where I gather input etc?
I'd be very grateful if someone could help me out with this, thanks in advance!