Input system rewrite

Everything about development and the OpenMW source code.
User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51

Input system rewrite

Post by scrawl »

Issue 88 and 118.

My current plans:

1. Move implementation to separate file, make it a class instead of struct, rename class to MWInput::InputManager (from MWInput::MWINputManager), fix indentation
2. Stub all functionality and remove Mangle completely, remove some parts of OpenEngine
3. Reimplement the OIS setup & listeners in InputManager implementation
4. Integrate ICS library for input rebinding ( https://sourceforge.net/p/oics/home/Ogre%20demo/ ) . Code was already built and reviewed and it seems very well written. The library has built-in loading and saving to XML, binding actions to mouse buttons (as required by MW) is also supported. As a bonus, it will make it very easy to add joystick support (is this Post-1.0? IIRC Morrowind supports it? Discuss)
5. Reimplement all input actions (both polled and listened actions) using ICS.
6. After everything works as before, start with the Hotkey window (the currently empty tab in settings window)
7. Ensure all input actions have the same default binding as in Morrowind.

Edit: the part about joysticks that comes for free with ICS library is the ability to bind your joystick keys / axis to any input action. However this will still not allow you to play the game with only the JS, some additional controls for the GUI interfaces will be needed.
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Input system rewrite

Post by Zini »

That sounds resonable. I see that you already assigned the hotkey task to yourself (#6 on your list). I also assigned keyboard and mouse binding task to you (#7).

I suggest you add at least one issue for #1-#5 and set it to 0.18.0.
Sadler
Posts: 24
Joined: 30 May 2012, 13:53

Re: Input system rewrite

Post by Sadler »

After the reimplementation of subsystem, "bind" console command may be implemented as a feature (as in Quake, HL etc.).
User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51

Re: Input system rewrite

Post by scrawl »

Done, I think. Everything went nice and easy.

I can add the mouse sensitivity sliders as well, but we need to decide first:
- separate sliders for camera sensitivity and GUI cursor sensivity? or hardcoded GUI cursor sensivity?
- separate sliders for X and Y?
If we go for maximum configurability, that would be 4 sliders, which is a bit overdone imo.

Morrowind has one slider for camera sensitivity X and one for camera sensitivity Y.
thoughts?
User avatar
Greendogo
Posts: 1467
Joined: 26 Aug 2011, 02:04

Re: Input system rewrite

Post by Greendogo »

I'd like access to both, as GUI mouse movement can get pretty tedious if you need to move a lot of inventory items around if you decide you want your turning speed slower. The opposite can be true as well, depending on your preference.

To add another point of view, if someone connects an Xbox 360 controller, or some other game controller, to their computer, the need for the separation of the two controls becomes more apparent. Using joysticks as a mouse is a tedious affair, but I think separating these controls can make it much more manageable.

If your concern is making it match the original game or for simplicity's sake, again I would vote for not worrying about it here. I'd rather have more control, after all, the average Morrowind user these days is a master of personal configuration. Zini or others may disagree.
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Input system rewrite

Post by Zini »

I wouldn't mind multiple sliders. The labels will be a problem. But unfortunately we have additional (non-localised) labels in the settings UI already. Some more labels won't cause additional harm.
User avatar
psi29a
Posts: 5362
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: Input system rewrite

Post by psi29a »

Can I tab out and int of OpenMW? Also... in windowed mode, can I use my mouse outside of OpenMW?
Tarius
Posts: 574
Joined: 24 Oct 2011, 19:29

Re: Input system rewrite

Post by Tarius »

scrawl wrote:Done, I think. Everything went nice and easy.

I can add the mouse sensitivity sliders as well, but we need to decide first:
- separate sliders for camera sensitivity and GUI cursor sensivity? or hardcoded GUI cursor sensivity?
Have we learned nothing from original MW? No hardcoding. If its something that involves user input, it should never be hardcoded.
Original MW has a hardcoded map, you know how much of a problem that has become.(admittedly not controls, but still something that sees quite alot of use)
Dead Space had "hardcoded" movement controls.(as in they couldnt be changed through the menu) Quite frankly, thats one of the worst decisions I have ever seen. Thankfully someone figured out how to bypass it to many peoples relief.(it was not something like a simple txt file edit)
Dead Space 2 has support on computer for controllers, but this is basically hardcoded in because there is no way to change the controls.
Space Empires 5, hardcoded max viewing distance. Too close for larger battles.

I could go on and on.
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Input system rewrite

Post by Zini »

Well, yeah. But the question is how much we move away from MW for 1.0. After OpenMW 1.0 we certainly will have a hefty de-hardcoding sessions.
User avatar
Greendogo
Posts: 1467
Joined: 26 Aug 2011, 02:04

Re: Input system rewrite

Post by Greendogo »

To add to that sentiment, the very fact that OpenMW is opensource means that nothing is really hard-coded.

In reality, though, most people aren't going to end up modding OpenMW through its source code. Enough, I hope, that it will continuously evolve and improve over time, or even branch into other projects with different visions.

But a lot of people won't want to learn C++ to change something, which is fine too; they have tons of other ways to alter their game in a more traditional way . No doubt OpenMW will have more non-source-code-related modding options than there were cliff racers on Vvardenfell; more than vanilla Morrowind, by far.
Post Reply