chaosfire / vdrift-ogre

Automatically exported from code.google.com/p/vdrift-ogre
0 stars 0 forks source link

Change Input to SDL2 #188

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
There were several problems with current OIS+OISB implementation. Both on Input 
screen and with undetected, crashing or freezing input devices.

Also Gui sometimes behaves sick, eg. in editor (and in game) quite often, you 
have like shift or some other modifier pressed, while it's not. Can't write in 
editboxes or fix it, need to close editor.

We need to change our Input code in editor and in game so it uses SDL (I think 
it's best and most portable, shouldn't have problems with most input devices).
So whole Input tab, binding, and also Gui input events need to be done with it.
There are also theese:
http://sourceforge.net/p/oics/home/Home/ OICS or 
http://sourceforge.net/projects/mosquito/ Mosquito no idea now, what would be 
best or just SDL.

Original issue reported on code.google.com by Cry...@gmail.com on 20 Nov 2012 at 5:26

GoogleCodeExporter commented 8 years ago
For reference, input problems were in: issue 147, issue 173, issue 185, issue 
113.

Original comment by Cry...@gmail.com on 20 Nov 2012 at 5:54

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
SDL 2.0 has forcefeedback for both linux and windows.
http://wiki.libsdl.org/moin.cgi/CategoryForceFeedback
MyGUI should be easy. Problem is with connecting SDL with OGRE:
http://www.ogre3d.org/tikiwiki/tiki-index.php?page=Using+SDL+Input
If SDL can be inited just for input without window that would be great if not 
it will be problematic, or maybe just use SDL for joysticks ?

Original comment by Cry...@gmail.com on 23 Nov 2012 at 4:26

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
OK, the plan is simple.
- Leave OIS for keyboard, mouse and Gui input.
- Use SDL2 for joysticks only (gamepads, wheel etc). Without event loop, get 
direct data from them.
- Throw out OISB binding, use a simple .cfg file. Rewrite code for that.
- Make sure that MyGui doesn't throw any exceptions on caption set from utf8, 
or just use english.
- Check multiple devices.
- Later add force feedback (SDL_HapticOpenFromJoystick and const force effect).

Original comment by Cry...@gmail.com on 26 Apr 2013 at 1:21

GoogleCodeExporter commented 8 years ago
Very useful link, see bottom, under Other Input Systems: 
http://www.ogre3d.org/tikiwiki/Basic+Tutorial+5
Also SDL doc:
http://www.libsdl.org/tmp/SDL-1.3-docs/SDL__joystick_8h.html
http://www.libsdl.org/tmp/SDL-1.3-docs/SDL__haptic_8h.html

Original comment by Cry...@gmail.com on 26 Apr 2013 at 1:25

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago

Original comment by Cry...@gmail.com on 17 Jul 2013 at 6:42

GoogleCodeExporter commented 8 years ago

Original comment by Cry...@gmail.com on 20 Jul 2013 at 7:28

GoogleCodeExporter commented 8 years ago
OIS, OISB have been thrown out and replaced with SDL2. Remaining to-do list:

 - Test multiple joysticks
 - Add inverse checkbox for JS axis
 - Cosmetic gui changes

Original comment by scrawl...@gmail.com on 26 Jul 2013 at 5:10

GoogleCodeExporter commented 8 years ago
- Editor using SDL2

Original comment by Cry...@gmail.com on 26 Jul 2013 at 8:41

GoogleCodeExporter commented 8 years ago
Ok now only
 - Test multiple joysticks
 - Bind 1 axis to throttle and brake (IIRC it was needed for controllers)

Original comment by Cry...@gmail.com on 28 Jul 2013 at 7:43

GoogleCodeExporter commented 8 years ago
- Test multiple joysticks (wasnt possbile, for later)
- Bind 1 axis (seems not needed, controllers have 2 axes)

OK all done by scrawl. Now on master.
For info we now use OICS for binding.
Now OIS and OISB are not used (and not needed).

Original comment by Cry...@gmail.com on 28 Jul 2013 at 6:31