About sealfin (twitter: @sealfin)

Student and freelance OS X & iOS developer

sealfin's Trophies

sealfin's Archive

SDL2 joystick interrogator 2.0

Posted by (twitter: @sealfin)
Thursday, August 2nd, 2018 9:00 am

SDL2 joystick interrogator 2.0

I recently rebooted development of a project I tried to develop for the Ludum Dare 20 contest held in April 2011, the theme of which was “It’s dangerous to go alone! Take this!”

As the project will require a controller with an analogue stick to play I’ve begun to develop a utility to interrogate the capabilities of various controllers; and, as I feel that the SDL2 documentation is lacking with regards to the joystick support offered by that library, I’ve posted – in addition to an executable of that utility for Mac OS X (and I want to release executables for additional platforms – the Raspberry Pi in particular – in the future) – the source code to that utility to GitHub for the benefit both of myself and of others.

Note that to use the utility you will need to have SDL2_image – in addition to SDL2 – installed.

Amongst the changes in version 2.0 of the utility are that:

  • the utility now features support for multiple controllers;
  • the utility now features detection of POV hats (and, contrary to what I wrote in the past, the D-pad of the Sony PlayStation 2 DualShock 2 controller is not disabled in analogue mode – rather, it is in that mode detected as being a POV hat (at least using my PlayStation-to-USB adapter));
  • the utility now features preliminary detection of trackballs – “preliminary” as neither of my controllers (the other being a Sony PlayStation 3 DualShock 3) features a trackball;
  • the utility now features preliminary detection of whether or not a controller has haptic capabilities – “preliminary” as neither of my controllers has been detected as having haptic capabilities in spite of both of my controllers having haptic capabilities (although my adapter or my OS (Mac OS X 10.6 Snow Leopard) might be to blame).

Line-line collision detection investigation (part two)

Posted by (twitter: @sealfin)
Friday, July 29th, 2016 7:11 am

I recently rebooted development of a project I tried to develop for the Ludum Dare 20 contest held in April 2011, the theme of which was “It’s dangerous to go alone! Take this!”

As the project will require a function for performing line-line collision detection, and as I’m interested in whether it is possible to program that function using the knowledge I’ve gained-, and the abilities I’ve developed-, studying the Introductory Algebra Review (MA004) and Visualizing Algebra (MA006) courses offered by Udacity, I’ve begun an investigation into programming that function.

In the second part of the investigation – posted to my blog – I investigate programming a function for performing line-line collision detection when the two lines are finite in length.

Line-line collision detection investigation (part one)

Posted by (twitter: @sealfin)
Saturday, July 9th, 2016 11:18 am

I recently rebooted development of a project I tried to develop for the Ludum Dare 20 contest held in April 2011, the theme of which was “It’s dangerous to go alone! Take this!”

As the project will require a function for performing line-line collision detection, and as I’m interested in whether it is possible to program that function using the knowledge I’ve gained-, and the abilities I’ve developed-, studying the Introductory Algebra Review (MA004) and Visualizing Algebra (MA006) courses offered by Udacity, I’ve begun an investigation into programming that function.

In the first part of the investigation – posted to my blog – I investigate programming a function for performing line-line collision detection when the two lines are infinite in length.

SDL2 joystick interrogator (third version)

Posted by (twitter: @sealfin)
Friday, September 25th, 2015 3:03 pm
Interrogating a Sony PlayStation 2 DualShock 2 controller; I've yet to figure out why SDL2 reports that the DualShock 2 has five axes (although my PlayStation-to-USB adapter might be to blame), I've yet to figure out a solution – which doesn't involve a ⅓ axis dead zone – to the problem of the thumbsticks on the DualShock 2 not always returning all the way to the origin when they're released, and I last touched a DualShock 2 a long, long time ago so I'd forgotten that the D-pad is disabled in analogue mode :/

Interrogating a Sony PlayStation 2 DualShock 2 controller; I’ve yet to figure out why SDL2 reports that the DualShock 2 has five axes (although my PlayStation-to-USB adapter might be to blame), I’ve yet to figure out a solution – which doesn’t involve a ⅓ axis dead zone – to the problem of the thumbsticks on the DualShock 2 not always returning all the way to the origin when they’re released, and I last touched a DualShock 2 a long, long time ago so I’d forgotten that the D-pad is disabled in analogue mode :/

I recently rebooted development of a project I tried to develop for the Ludum Dare 20 contest held in April 2011, the theme of which was “It’s dangerous to go alone! Take this!”

As the project will require a controller with an analogue stick to play I’ve begun to develop a utility to interrogate the capabilities of various controllers – and as I feel that the SDL2 documentation is lacking with regards to the joystick support offered by that library I’ve posted to my blog the source code to the third version of that utility, for the benefit both of myself and of others.

SDL2 joystick interrogator (second version)

Posted by (twitter: @sealfin)
Thursday, August 13th, 2015 9:04 am
Interrogating a Sony PlayStation 2 DualShock 2 controller.

Interrogating a Sony PlayStation 2 DualShock 2 controller.

I recently rebooted development of a project I tried to develop for the Ludum Dare 20 contest held in April 2011, the theme of which was “It’s dangerous to go alone! Take this!”

As the project will require a controller with an analogue stick to play I’ve begun to develop a utility to interrogate the capabilities of various controllers – and as I feel that the SDL2 documentation is lacking with regards to the joystick support offered by that library I’ve posted to my blog the source code to the second version of that utility, for the benefit both of myself and of others.

SDL2 joystick interrogator (first version)

Posted by (twitter: @sealfin)
Saturday, August 8th, 2015 12:57 pm

SDL2 joystick interrogator animation

I recently rebooted development of a project I tried to develop for the Ludum Dare 20 contest held in April 2011, the theme of which was “It’s dangerous to go alone! Take this!”

As the project will require a controller with an analogue stick to play I’ve begun to develop a utility to interrogate the capabilities of various controllers – and as I feel that the SDL2 documentation is lacking with regards to the joystick support offered by that library I’ve posted to my blog the source code to the first version of that utility, for the benefit both of myself and of others.

[cache: storing page]