Hello Guest

Controllers

  • 60 Replies
  • 59097 Views
*

kevglass

Controllers
« on: August 29, 2004, 17:14:01 »
Is there anyone working on "Controller" implementations for other platforms, i.e. Linux?

On another note, has anyone considered extending the LWJGL controller support to allow multiple controllers on one machine?

Kev

*

Offline elias

  • *****
  • 899
    • http://oddlabs.com
Controllers
« Reply #1 on: August 29, 2004, 20:32:14 »
Not that I know of. I (the linux maintainer) don't even have a gamepad or joystick of any sort. Multiple controllers would be nice though, it's probably a pretty common setup (esp. if you're a wannabe console maker, right? ;-) )

 - elias

Controllers
« Reply #2 on: August 29, 2004, 22:12:34 »
Quote from: "elias"
Not that I know of. I (the linux maintainer) don't even have a gamepad or joystick of any sort. Multiple controllers would be nice though, it's probably a pretty common setup (esp. if you're a wannabe console maker, right? ;-) )

 - elias


Are there harsh penalties (duties and what not) for importing USB gamepads to Denmark and what not?  If not, I might be willing to ship you a couple Gravis pads (if I can locate some) for the Linux/OS X cause, if you're interested.

EDIT:  actually, It'd probably be better to ship a couple Playstation2->USB converters.  I like the PS2 controllers over anything I've messed with on the PC front...
ife sucks, kill yourself.

*

Offline Matzon

  • *****
  • 2242
Controllers
« Reply #3 on: August 30, 2004, 05:20:22 »
I think that elias won't have time for doing controllers for linux / mac before the actual mac port is done (ogl/oal first). And when that time arrives, hopefully somone else has done it ;) - and if not, I could probably just drive over to elias and let him borrow my controller (we live ~ <10 km from each other)

*

kevglass

Controllers
« Reply #4 on: August 30, 2004, 08:02:11 »
I wouldn't mind taking a look, I'll probably want it soon anyway. But I'd like to do the multiple controllers bit at the same time (since if anything I reakon thats more important).

Essentially, since JInput already does linux alright and SDL exists it should make it pretty easy. Not to mention Endolf being a mate of mine :)

Kev

*

Offline Matzon

  • *****
  • 2242
Controllers
« Reply #5 on: August 30, 2004, 09:28:22 »
well, I am all for doing multiple controllers, but it needs to be in a very simple api - jinput is too... fiddly for my liking.
isn't linux controllers possible without sdl? I would hate that dependency...

*

Offline elias

  • *****
  • 899
    • http://oddlabs.com
Controllers
« Reply #6 on: August 30, 2004, 09:59:28 »
I know that at least recent kernels (>=2.4) supports HID like the Mac OS X. That would be a good standard to expose, avoiding SDL.

 - elias

*

kevglass

Controllers
« Reply #7 on: August 30, 2004, 12:49:51 »
Ah, I didn't mean USE SDL, I meant read their code, work out how they did it and rewrite. SDL is LGPL anyway, too scary to get dependant on.

API:

Controllers static, getControllerCount() and getController() returning an interface that looks just like the Controller now?

Kev

*

Offline Matzon

  • *****
  • 2242
Controllers
« Reply #8 on: August 30, 2004, 13:51:27 »
either that, or public static array of controllers?
Controller.controllers[1].getX();

or set active controller before using methods
Controller.setActiveController(index) (or Controller.use(index))

we could also pass the controller index to a method?
Controller.getX(0);


lots of ways... - though somewhat untraditional, I kinda like the last way... opinions?

*

Offline elias

  • *****
  • 899
    • http://oddlabs.com
Controllers
« Reply #9 on: August 30, 2004, 14:14:54 »
Definitely the Kevglass way. We certainly don't want to pass an index around to all methods.

 - elias

Controllers
« Reply #10 on: August 30, 2004, 17:40:17 »
I agree.  No point in passing around indices when you can just hold onto an Object.
ellomynameis Charlie Dobbie.

*

kevglass

Controllers
« Reply #11 on: August 30, 2004, 19:00:40 »
Looking at the C for the controllers stuff it'd need heavy work to support multiple controllers (WIN32). Does this need doing?

Kev

*

Offline elias

  • *****
  • 899
    • http://oddlabs.com
Controllers
« Reply #12 on: August 30, 2004, 20:38:34 »
While we're at it, Controller seems slightly limited. Isn't a controller merely a collection of axes (digital or analog), buttons and whatnot? Or does every controller fit the POV, Rot axis and axis and buttons view?

 - elias

*

kevglass

Controllers
« Reply #13 on: August 30, 2004, 20:44:04 »
Careful, you'll turn it into JInput complexity... shouldn't the API be as game oriented as possible, the functionality it currently exposes should cover every game type in existence (and does so in a simple manner)

Kev

*

Offline elias

  • *****
  • 899
    • http://oddlabs.com
Controllers
« Reply #14 on: August 30, 2004, 20:59:47 »
Maybe so, but I'm still worried. What is done if the controller in question has more than one of the same type of axis for example? Will we choose one? Make them all act the same?

 - elias