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 (408)
games submitted by our members
Games in WIP (293)
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 Windows/Mac for new gaming device....  (Read 2743 times)
0 Members and 1 Guest are viewing this topic.
Offline was22

Junior Newbie





« Posted 2010-11-01 00:28:18 »

Hi,

My company is developing a new foot operated gaming device that connects through USB to Windows and Macs machines. We were considering doing the development in C++ because of the unavailability of USB support from Javasoft. However, after quite an amount of time spent searching online, I found JInput.

My question to all those who have used it: is it stable for use in production quality software?
Can we rely on it to access USB smoothly from Windows and Mac?

Of course, will be doing my own testing. Still, much appreciate you input and exprience
with this library. I will post my experience anyways for others to benefit from.

Thanks for reading (and hopefully responding:)
Saad

Oct 31,2010

Offline Riven
« League of Dukes »

JGO Overlord


Medals: 439
Projects: 4


Hand over your head.


« Reply #1 - Posted 2010-11-01 00:44:59 »

If the USB device registers itself as a Human Input Device, you should be safe. JInput does little more than exposing the controllers in the system. If (for example) DX can do it, JInput should be able to do it too.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Projects: Revenge of the Titans, Titan Attacks, Droid Assault, and Ultratron
Offline endolf
« League of Dukes »

JGO Coder


Medals: 4
Projects: 1


Current project release date: sometime in 3003


« Reply #2 - Posted 2010-11-01 08:10:07 »

JInput relies on the OS to handle the device, it's little more than a wrapper around the native code. On OSX this means a HID device, under linux it has to show up in /dev/input/event* and under windows it needs to appear as a raw device and/or a directx device.

HTH

Endolf

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline was22

Junior Newbie





« Reply #3 - Posted 2010-11-02 16:39:25 »

Hi,

Thanks all for your responses.

At the time being, it is implemented as a USB-CDC (Communications device control).  So, it
appears as a comm port to Windows and all needed is to talk to the comm
port that appears in COM & LPT ports list.

Does the JInput support CDC?

Regards,
Saad
Offline endolf
« League of Dukes »

JGO Coder


Medals: 4
Projects: 1


Current project release date: sometime in 3003


« Reply #4 - Posted 2010-11-02 16:45:12 »

As per my previous post, JInput relies on HID devices on osx, Raw/Directx in windows and /dev/input/event* on linux, it isn't a general USB handler. It doesn't handle any other port type, there is a project that handles com ports under windows for Java if I remember correctly.

JInput does have a plugin mechanism, so with some work by an interested party, it could be made to read com ports (virtual or otherwise), but it does make assumptions about what is exposed, e.g. axis, buttons etc.

Endolf

Offline Nate

JGO Wizard


Medals: 81
Projects: 3


Esoteric Software


« Reply #5 - Posted 2010-11-02 21:36:51 »

At the time being, it is implemented as a USB-CDC (Communications device control).  So, it
appears as a comm port to Windows and all needed is to talk to the comm
port that appears in COM & LPT ports list.

Your best bet, if you want to use Java, is to use the rxtx project:
http://users.frii.com/jarvi/rxtx/
See here for an example:
http://code.google.com/p/pg3b/
Specifically:
http://code.google.com/p/pg3b/source/browse/trunk/Java/src/com/esotericsoftware/controller/pg3b/PG3B.java

Offline was22

Junior Newbie





« Reply #6 - Posted 2010-11-03 00:56:50 »

Thanks all for your response. Rxtx seems what I was looking for.
Regards.
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!
 
Get high quality music tracks for your game!

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 (130 views)
2013-05-17 21:29:12

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

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

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

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

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

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

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

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

UnluckyDevil (228 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.111 seconds with 21 queries.