Improving the flexibility of my library/what can be improved? How can I make my library more flexible towards programmers? Here is my library. It's a basic library that provides a simple interface to organise your game (with scenes, and engine/game connection). The only problem that I dislike about it, is the fact that you cannot create a custom 'game loop', you must let the GameLoop class deal with that for you. You can only instead, call to update/draw of the loop if you cannot use a while loop and manually clog the main thread (e.g. Ogre3d and it's call backs to update your game).

I'm also curious on what I can improve upon this library. Does my tutorial make sense? Is my code clean?

https://github.com/miguelishawt/pine
A few observations/thoughts from a quick look at the code and accompanying description. Feel free to explain/correct as appropriate:


For starters, the Game class seems to delegate everything to the GameLoop class, why? It seems more logical that GameLoop would drive the Game which would make use of GameEngine do to input/output and GameStateStack (or stacks) to keep track of game-related states. As it stands, I need to think in terms of frame changes/deltas in more than one section of the code.
When would I want to use the GameLoop as-is as opposed to using isRunning()/update() or deriving from GameLoop? Why not place the call to initialize() in the constructor?
Why does GameStateStackListener need to know about the GameStateStack? Does it consume events or produce events? Or both? How do you avoid infinite recursion if both? 
Why only one type of GameStateStack per listener? We might want to keep track and be informed of several state types (for instance, a character would want to be notified of changes in gravity and wind).


I think you should make and publish a simple game using this library to illustrate the purpose of each class