How to design a game engine in an object-oriented language?
- by chuzzum
Whenever I try and write a game in any object-oriented language, the first problem I always face (after thinking about what kind of game to write) is how to design the engine. Even if I'm using existing libraries or frameworks like SDL, I still find myself having to make certain decisions for every game, like whether to use a state machine to manage menus, what kind of class to use for resource loading, etc.
What is a good design and how would it be implemented? What are some tradeoffs that have to be made and their pros/cons?