Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (577)
games submitted by our members
Games in WIP (498)
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 1675 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!
Legends of Yore - The Casual Retro Roguelike
Offline fnkychkn

Innocent Bystander




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.

 

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

The first screenshot will be displayed as a thumbnail.

xsi3rr4x (18 views)
2014-04-15 18:08:23

BurntPizza (15 views)
2014-04-15 03:46:01

UprightPath (28 views)
2014-04-14 17:39:50

UprightPath (13 views)
2014-04-14 17:35:47

Porlus (29 views)
2014-04-14 15:48:38

tom_mai78101 (54 views)
2014-04-10 04:04:31

BurntPizza (111 views)
2014-04-08 23:06:04

tom_mai78101 (212 views)
2014-04-05 13:34:39

trollwarrior1 (181 views)
2014-04-04 12:06:45

CJLetsGame (187 views)
2014-04-01 02:16:10
List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:05:20
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
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!