Was inspired to make this post after I saw this on the mailing list from James:
"Android: Turn off by default Accelerometer, Gyroscope, and Multitouch gestures.
None of these are actually used in any way yet."
Accelerometer and gyro are pretty standard on phone and tables these days. Multitouch exists, but the amount of individual inputs is not. Some devices can only do 2 while some can do up to 4 or 5.
Would any of you want to use this functionality? And how would you like to see it implemented?
Some ideas:
Accelerometer could be mapped as a key named SHAKE. or SHAKE_LIGHT and SHAKE_HARD. This would let you use it in existing plotscripts easily as another key to look for, and would let you remap/multimap it to keyboard or other buttons.
Gyro would be a bit more complicated. Perhaps a game bitset where tilt can be mapped as an analog joystick on the X plane.
Thoughts?
With incoming Android releases, there are more inputs
Moderators: Bob the Hamster, marionline, SDHawk
- Bob the Hamster
- Liquid Metal King Slime
- Posts: 7460
- Joined: Tue Oct 16, 2007 2:34 pm
- Location: Hamster Republic (Ontario Enclave)
- Contact:
I've never used a cellphone app that used any of those inputs, but a 'shake' or single valued return doesn't sound very useful. Why not return the 3D input with new script commands "accelerometer(axis)" and "gyroscope(axis)"? We could also optionally map those down to additional joysticks, throwing away one axis, but that seems rather pointless because very likely zero OHR games support multiple joysticks.
However, the accelerometer input especially needs to be filtered to be useful; that should be done in the engine.
Looking at the code, I'm surprised to see that all of gfx_fb, gfx_sdl and gfx_directx appear to have complete support for multiple joysticks and that ti is exposed to scripting. Does that mean that only script commands for querying the number of joysticks and information about each joystick are missing? (Aside from the bad joystick support in the rest of the engine.)
However, the accelerometer input especially needs to be filtered to be useful; that should be done in the engine.
Looking at the code, I'm surprised to see that all of gfx_fb, gfx_sdl and gfx_directx appear to have complete support for multiple joysticks and that ti is exposed to scripting. Does that mean that only script commands for querying the number of joysticks and information about each joystick are missing? (Aside from the bad joystick support in the rest of the engine.)
Last edited by TMC on Tue Aug 13, 2013 11:36 am, edited 2 times in total.