Since C++ offers no possibility to get all constants of an enum, each enumerator is hardcoded. I tried to reduce boilerplate code to a minimum and have a static assertion in case Laurent suddenly adds new keys
Allright, I myself is currently on work on a keymanager for my game. It includes classes; nn::KeyManager, nn::Key, nn::Action and nn::Binding.
nn::KeyManager hold all keys, actions and binding.
nn::Key holds a sf::KeyCode~, a name and a displayname, and functions to get if the key was pressed, released, the current state etc.
nn::Action holds a displayname and a commandname.
nn::Binding holds a pointer to a nn::Key and a nn::Action.
The (command)name in both action and key is the "identifier", what to type in console to bind them togheter(for example "bind leftctrl jump"), commandname also has to be a valid command for the engine (a la quake).
And the DisplayName for both is what to show to the user(especially under the keybinding options in menu).
Just thought I'd share in case you wanna bind your key-management with your custom eventhandling thingy
Depends on what you understand by game engine. I see it like some sort of rigid framework that offers functionality for almost every part of a game and where the single parts often depend on each other. With Thor, I try to keep them more or less independent, and to cover mainly frequently-used functionality. Thus, one can only use the modules that are needed, without aligning the whole application towards the library design.
However, the Resource module tends to increase coupling. For example, the Particles and Animation module depend on it since they use ResourcePtr. Maybe I switch to the standard shared_ptr... This just as a sidenote. I'm always open for design discussions, just post what you think!
Class independence is a great thing for such a library, And I totally agree on keeping it as a framework rather than an engine, lets just call it a really flexible game api-extension to SFML
Regarding the Particles, im not sure how things work anymore since I dont use them after my SFML2-post-texture-port (never got the time to look up the changes heh), but it sure would be nice if you didnt bind the particles to your resourcemanagement, since Im looking forward to implement particles in my game again, and I allready have my own resourcemanager wich have to load files from my custom packaging format etc. Remember that you could just bind a sf::Image(when it was current) to a particlemanager, isnt that the case anymore(but for sf::Texture) ?