   Structuring an engine.
  Yar!I'm working to create a game engine in Python using PyGame & OpenGL. I pretty much understand most of Python/Pygame/OpenGL and such, but I was wondering:How should a game engine be structured? I'm not the best at structuring my code so that it is easy to read and understand. I don't want to start off with a mess and then majorly regret it later when I need to change something.   
  Don't write an engine, write a game. ;)The reason people will tell you this is that you can't tell what makes a good engine untill you've built a few games before, simply because you haven't seen what's common between all these games and what isn't, what needs to be in an engine and what is going to be a waste of time. Besides, a first project is always going to run into problems, most projects will. Don't get discouraged, but learn from it instead. That's how you get experience. :)Anyway, what kind of game are you working on? Different games have different pitfalls, so being a bit more specific enables us to give more specific tips.   ;  Mmhm. ;) Thank you. Also, it's a shooter.   ;  I've also had prior programming experience, and I've made a few games. I'm just new to 3D programming.   ;Clean it up as you go. Constantly.;  Well, If your using classes and you stick to the Single Responsibility Principle, you can easily refactor the structure of a game. Exactly what that structure is will come to you with time.   ;Quote:Original post by ZahlmanClean it up as you go. Constantly.Thanks for the link!