I started a little game project and I found that world is lacking a decent open source input binding library, so I created one. It's in draft, pre-release stage but I really need some opinions and since OIS forum is nowhere near as active as the Ogre one, I posted here, hope I am not upsetting anyone

What is OISB?
First of all, it's a contributed OIS project building on top of OIS, thus the only dependency is OIS, it should be troublefree to use this in any project already using OIS.
License:
zlib/libpng (same as OIS)
What does it do?
If your project is using OIS, you're probably checking keystates and fetching the MouseState every frame to check their values. Your code looks similar to this:
Code: Select all
void Game::listenInput()
{
if (mOISKeyboard->isKeyDown(OIS::KC_A))
mPlayer->moveLeft();
...
}
The alternative to this approach is:
Code: Select all
void Game::listenInput()
{
if (mMoveLeftAction->isActive())
player->moveLeft();
}
Code: Select all
mMoveLeftAction->bind("Keyboard/A");
EDIT: This section was edited, since it now works differently

Code: Select all
mMoveLeftAction->bind("Keyboard/A");
mMoveLeftAction->bind("Keyboard/Left");
You can even bind combinations, for example to implement the insane difficulty in your game, you can do this:
Code: Select all
mMoveLeftAction->bind("Keyboard/Ctrl", "Keyboard/Alt", "Keyboard/A");
To make it hard even for Windows users, you might want to introduce SequenceAction (really initial non tested implementation in svn, needs more work), the action used before is a TriggerAction (means all of the bound states in at least one binding have to be active to activate the action), SequenceActions provide means to implement things like the good old "iddqd". The binding code is the same but instead of creating TriggerAction, create SequenceAction.
OK, we have sorted out the case when users want to remap their digital keys and even allowed combinations and sequences. How to improve on this? OISB also provides analog axis actions. As the name suggest, they store floating point number representing position on an axis. This can be used especially for racing games. The reason to use AnalogAxisAction instead of TriggerAction with the code above is that users can bind both digital states and analog states (AnalogAxisAction provides means for emulating analog input using digital states). This means that you will make both keyboarders and racing wheel users happy!

How to get the code?
I have moved this over to google code so that I can add committer rights to others without bothering pjcast.
http://code.google.com/p/oisb
old: pjcast has set a branch for me in the OIS svn tree (thanks!) - https://wgois.svn.sourceforge.net/svnro ... mpreisler/
It's the OIS' root, the oisb folder in there contains OISB sources.
The old SVN repo is therefore no longer authoritative!
What do I need right now (or: why am I spamming you?

I need ideas and responses (I've had some negative "why the hell would you need that" responses and some positive ones, I need to motivate myself a bit, knowing somebody might use the work I am doing would help tremendously), feature requests would help too


PS: I will hopefully provide a demo application soon (I have a working Ogre, OIS, CEGUI demo of OISB but it's way too complicated to use as OISB demo). I don't want to do tutorials yet since I will be renaming/moving some stuff and otherwise breaking the API.