Not logged inGosu Forums
Forum back to libgosu.org Help Search Register Login
Up Topic Gosu / Gosu News / Gosu 0.8.7(.2) released
- - By jlnr (dev) Date 2015-01-18 23:28
This is a minor Ruby-only release while I keep working on the CMake build system for C++.

Two fixes:
• All: Improve gamepad support by using the SDL_GameController API
• Windows: Fix LoadError in Ruby 2.1.x x64 gem

SDL_GameController provides a streamlined interface for accessing common gamepads. For example, the Xbox 360 controller reports six axes (plural of axis, not ax…) when you query it over USB: x/y of each analog joystick, plus both analog shoulder buttons. The D-Pad is reported not as a single "hat", but as four completely unrelated buttons. This doesn't match Gosu's heuristic which maps axes and hats to the four directions, and buttons to GpButton0 through GpButton15.

SDL_GameController knows about common gamepads and maps them to sane values. In the case of the Xbox 360 controller, both analog sticks and the D-Pad are translated into the four directions, and only actual buttons are mapped to the GpButton* constants.
Reply
Parent - - By BlueScope Date 2015-02-09 19:02
So, is there a way to directly access the input from the controller now? I do use a 360 Gamepad, and getting the x/y data for the 3 "sticks" would be handy, if only to get actual 360° movement and not "just" 8 directions. I don't know about others, but personally, a simple method to access values (such as gamepad_input[1][3], with buttons returning true/false and triggers and sticks the respective value) would be perfectly sufficient.

All in all though, this works much better than in previous versions already, I have to say. I've been experimenting with gamepads a bit now (I finally have 2 360s, so I can do some shenanigans), and I'm glad there's been some development in that :)
Reply
Parent - By jlnr (dev) Date 2015-02-09 20:40
There isn't - but I agree that Gosu's button_id model too simplistic. :) Rewriting Gosu's input interface has always been on my long-term wish list, but I didn't have a good plan for it, and gamepads have generally been a mess back then (USB gamepads from various no-name vendors).
Thankfully, SDL 2 has added support for high-level "Game Controllers", and Gosu can simply provide a thin wrapper around their interface. Yay! Less thinking and more grunt work for me. I don't have a time line, but contributions are welcome.
Parent - - By ? Date 2015-05-16 21:17
Hello, just to say that gem install gosu on OSX10.10 produces an error for me.

In file included from Audio-AudioOpenAL.cpp:1:
In file included from ./../../src/Audio/AudioOpenAL.mm:1:
In file included from ./../../src/Audio/AudioOpenAL.cpp:2:
./../../src/Audio/OggFile.hpp:6:10: fatal error: 'vorbis/vorbisfile.h' file not found
#include <vorbis/vorbisfile.h>
         ^
2 warnings and 1 error generated.
make: *** [Audio-AudioOpenAL.o] Error 1
Parent - - By jlnr (dev) Date 2015-05-16 21:25
Gosu 0.8.0 and later are not self-contained (sadly) - see this wiki page for a list of required libraries:

https://github.com/jlnr/gosu/wiki/Getting-Started-on-OS-X
Parent - By ? Date 2015-05-19 05:15
Thanks for that.
Up Topic Gosu / Gosu News / Gosu 0.8.7(.2) released

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill