Author Topic: libShake - rumble library for GCW Zero  (Read 2667 times)

zear (OP)

  • * Moderator
  • Posts: 2381
libShake - rumble library for GCW Zero
« on: July 24, 2015, 08:47:54 pm »
I'd like to offer a sneak-peek into a project me (zear) and jxv have been working on for the last six months:

libShake - a rumble library for GCW Zero.

Our motivation behind this project was the lack of proper rumble library for Linux other than SDL2.
Because most of the GCW Zero games are using SDL 1.2, implementing rumble support for those programs wasn't trivial and until now no games were making use of the built-in vibration module.
libShake is a response to this issue and provides an easy way to add rumble to any game or software project. Additionally, libShake will run on any Linux computer with Linux Force Feedback API compatible gamepads/joysticks (ie. Xbox 360 pad or Logitech F710).

Status (0.2.0 branch):
Support for all vibration effects: rumble, periodic, constant, ramp.
True force-feedback (servo movement) effects are currently not supported: spring, friction, damper, inertia.

Please note that the GCW Zero rumble driver is limited to rumble and periodic effects only.

Documentation:
Currently the project doesn't have a proper documentation, however you can still learn about the usage by analyzing the source code of our example, libShake implementation in Liero; or by joining our IRC channel: #libShake @ freenode.org.

Availability:
libShake source code: https://github.com/zear/libShake/tree/0.2.0
Python bindings (by Cheery): https://github.com/cheery/cffi-gen

We expect libShake to be included in the next revision of the GCW Zero toolchain and firmware update, and thus come without a need to include it separately in game OPKs.

Compatibility with GCW Zero:
The currently released GCW Zero firmware (2014-08-20) suffers from a bug in the rumble driver, where the motor never stops after the end of an effect. It keeps running until the rumble device is closed. A fix to this bug will come in the next firmware update, but until that time please take it into account when implementing libShake in your software.

I'd like to add that the rumble motor was extensively tested with 1 hour constant vibration sessions at 15% and 100% of the motor gain, which it passed flawlessly. Additionally multiple units were tested during regular libShake development over the course of 6 months.


PS. Special thanks to hi-ban for the awesome project logo (CC-BY-SA).



Let's move to the probably most interesting part of this post.

As part of our development, we'd like to know what is the most preferable sensitivity of the rumble motor on GCW Zero.
To test that, we are publishing a testing build of Liero with rumble support, which you will find below.
While you try it, please leave us a comment below, giving answers to the following questions:

1. Do you use rumble on other devices (home consoles, PC, handhelds)?
2. Does rumble work on your GCW Zero with the below OPK?
2. Which rumble gain value (0-100%) is the most enjoyable for "weak" rumble mode?
3. Which rumble gain value (0-100%) is the most enjoyable for "medium" rumble mode?
4. Which rumble gain value (0-100%) is the most enjoyable for "strong" rumble mode?




In order to modify the rumble gain (strength), launch Liero and go to "OPTIONS -> PLAYER 1 OPTIONS", then manipulate the "GAIN" value by pressing left/right on the d-pad (see screenshots above). By default, the gain is set to 15%.

One last important detail - as mentioned above, the current GCW Zero firmware suffers from a rumble driver bug that renders this build of Liero unplayable. However this doesn't mean untestable - the bug doesn't interfere with the goal of the above test, so please have that in mind.

Liero build for testing: https://github.com/gcwnow/liero/releases/download/rumble_wip/liero_libShake_test_2015-07-24.opk
NOTE: We take no responsibility for any damage caused by our software - you are using it at your own risk!

ubervison

  • Posts: 9
Re: libShake - rumble library for GCW Zero
« Reply #1 on: July 24, 2015, 09:45:51 pm »
Hi zear !

Thanks a lot for the great work.

1. I occasionally use rumble on my PC when playing games with a pad.
2. Rumble does work with the opk you provided.
3. I feel that 15% would be the most appropriate for a "weak" mode
4. Something between 40-50% would be good for "medium"
5. I would say at least 80% for "strong"

As I side note, I notice that rumble is very noisy, at least on my device. Is it the case on every unit ?

Cheers

zear (OP)

  • * Moderator
  • Posts: 2381
Re: libShake - rumble library for GCW Zero
« Reply #2 on: July 24, 2015, 09:57:10 pm »
As I side note, I notice that rumble is very noisy, at least on my device. Is it the case on every unit ?
It is a lot noisier on the prototypes, but the retail units also produce noise. I don't think there's much we can do about that.

ShadowApex

  • Posts: 6
    • Tuxemon Project
Re: libShake - rumble library for GCW Zero
« Reply #3 on: July 30, 2015, 07:06:52 am »
I duplicated the libShake example in Python using ctypes for anyone interested in using it in their Python project. You'll need to compile the libShake library prior to using it.

You can view the example here:
https://github.com/ShadowApex/libShake/blob/master/examples/example.py

 

Post a new topic