Java-Gaming.org
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
Featured games (78)
games approved by the League of Dukes
Games in Showcase (404)
games submitted by our members
Games in WIP (289)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Jinput on OSX  (Read 1489 times)
0 Members and 1 Guest are viewing this topic.
Offline Tomas

Junior Member




Agency9


« Posted 2004-10-21 07:01:57 »

I've tried to mix AWT and Jinput on OSX and got strange behaviour.
I use awt for keyboard and jiput for mouse control. The application works fine on Windows and Linux, but it behaves erratic on OSX.

On OSX I only get events from the keyboard sporadically and some events don't even arrive at all Huh

The application is very well behaved and sleeps 50 ms each update so it should not be a scheduling problem.

// Tomas

CTO Agency9
Offline Tomas

Junior Member




Agency9


« Reply #1 - Posted 2004-11-01 13:11:30 »

Since I didn't get a reply on this one I will rephrase Wink
Anybody successfully used jinput on OSX ?

CTO Agency9
Offline swpalmer

JGO Coder




Where's the Kaboom?


« Reply #2 - Posted 2004-11-10 21:53:23 »

The OS X port isn't nearly as polished as the Linux/windows versions.

I have never used it in a serious application, I've only messed around with the various test apps and managed to tweak the code to get my game-pad recognized.   I didn't notice any severe problems with the keyboard, but I would not likely have noticed the issues you are seeing.

Games published by our own members! Check 'em out!
Play the free demo of Revenge of the Titans!
Offline fnkychkn

JGO Visitor



Java games rock!


« Reply #3 - Posted 2005-04-22 19:20:25 »

i've been working on getting JInput to work on OS X for a playstation 2 controller using a usb adapter.  this works perfectly on the pc, but I've been having a great deal more difficulty getting it working properly on the Mac.

The issue I face now...  I can find the controller "PSX/USB" in the controller environment, but I cannot seem to detect any axes on this controller.  I think that the environment sees them, since it lists a number of buttons and whatnot when it finds the device (controller environment).  However, when I try to assign the axes to an array, it ends up being zero length.

final Controller controller = controllers[index];
           final Axis[] axis = new Axis[axes.length];
           
           for (int i=0;i< axes.length; i++) {
                 axis = axes;
           }
           System.out.println("# of axes ==> "+axis.length);
           for (int i=0;i<axis.length;i++) {
                 System.out.println(axis.getName());
           }
           

Anybody have any ideas as to why this might be?  Anyone successfully implemented a PS2 controller on a Mac with JInput?

thanks
Offline cjcdoomed

Junior Newbie




Java games rock!


« Reply #4 - Posted 2005-05-05 04:09:58 »

If anyone is interested, I have an OSXJoystick implementation that works with the Logitech Extreme 3D.  All 12 buttons, X, Y, RX, RY, Hat and Slider are recognized and accessible.

I still haven't heard back on incorporating my OS X fixes back into CVS to fix the nightly build.

Offline Jeff

JGO Coder




Got any cats?


« Reply #5 - Posted 2005-05-05 06:06:34 »

Did you make the request under cjcdoomed?

If not  please email me what the name is that I shoudl approve at
jeffrey.kesselman@sun.com

Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Offline Jeff

JGO Coder




Got any cats?


« Reply #6 - Posted 2005-05-05 06:22:06 »

Quote
i've been working on getting JInput to work on OS X for a playstation 2 controller using a usb adapter.  this works perfectly on the pc, but I've been having a great deal more difficulty getting it working properly on the Mac.

The issue I face now...  I can find the controller "PSX/USB" in the controller environment, but I cannot seem to detect any axes on this controller.

<snip>

Anybody have any ideas as to why this might be?  Anyone successfully implemented a PS2 controller on a Mac with JInput?

thanks


SOme controllers are composite cotrolelrs, their axes are actually on sub controllers.

To find out do a getControllers() omn the controller, it it does not return nul lthen it has sub scontrolelrs so repeat the process for each sub controller.

(Theoretically its can recurse indefinitely. In practice I have yet to find a controller that is more then one sub-controller deep, but you never know... )

Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Offline cjcdoomed

Junior Newbie




Java games rock!


« Reply #7 - Posted 2005-05-20 14:37:28 »

Looking at the OSX controllers, it seems that mouse and keyboard are the only full functional implementations.

I've checked in a functional version of OSXJoystick modeled after OSXMouse and the joystick implementations on the other platforms.

I've got x axis, y axis, z axis, x rotational, y rotational, slider, hat and any number of buttons all working.

I tested this using a Logitech Extreme 3D.

I've just ordered the Logitech Rumblepad 2 Vibration Feedback Gamepad and once I've got a working OSXGamepad, I'll check that in too.  
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
 
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars and Titan!

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

The invasion has landed! On Mars! And you're there to beat 'em!
cubemaster21 (42 views)
2013-05-17 21:29:12

alaslipknot (51 views)
2013-05-16 21:24:48

gouessej (79 views)
2013-05-16 00:53:38

gouessej (79 views)
2013-05-16 00:17:58

theagentd (87 views)
2013-05-15 15:01:13

theagentd (81 views)
2013-05-15 15:00:54

StreetDoggy (123 views)
2013-05-14 15:56:26

kutucuk (147 views)
2013-05-12 17:10:36

kutucuk (147 views)
2013-05-12 15:36:09

UnluckyDevil (157 views)
2013-05-12 05:09:57
Complex number cookbook
by Roquen
2013-04-24 12:47:31

2D Dynamic Lighting
by Oskuro
2013-04-17 16:46:12

2D Dynamic Lighting
by Oskuro
2013-04-17 16:45:57

2D Dynamic Lighting
by Oskuro
2013-04-17 16:23:20

Noise (bandpassed white)
by Roquen
2013-04-05 17:36:01

Noise (bandpassed white)
by Roquen
2013-04-03 16:17:38

Java Data structures
by Roquen
2013-03-29 13:21:12

Topic Request
by kutucuk
2013-03-22 21:42:01
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!
Page created in 0.131 seconds with 21 queries.