So, I'm still nibbling around the edge of Python (which I've used a little bit previously). I've moved away from libtcod and started using PyGame instead. I've managed to get some sprites on screen from a sprite sheet, woo.
I'm running into the (very broad) problem of how to structure my code. I have an idea of what I want the general game flow to be like (start program, title screen, select new game, generate new game world, main game loop, call up main menu, save game, close menu, continue playing, call up main menu, load game, etc), but I'm coming unstuck over the best/most intuitive way to structure things.
I'm not entirely sure of the best way to deal with an openable/closable main menu that's available both outside of the main 'game' loop (i.e. when you first start the program) but can also be accessed from within it (i.e. by hitting Esc in-game, or whatever). I'm wondering if I should be setting up my display engine as simply an entirely different class to my game engine, and calling it from there or wherever...and use it to distinguish between whether to display a menu, the normal game screen, the generate-a-new-world screen, etc. But that starts to sound very complicated and spaghetti-like, and I'm wondering if there's a simple structural solution that my brain's choosing to ignore?
Interested in how other people have structured their overall program flow!