diff --git a/.cvsignore b/.cvsignore deleted file mode 100644 index 21df587..0000000 --- a/.cvsignore +++ /dev/null @@ -1,5 +0,0 @@ -classes -tmp -build -archiv - diff --git a/README.md b/README.md new file mode 100644 index 0000000..265c09a --- /dev/null +++ b/README.md @@ -0,0 +1,52 @@ +Fork of , see . + +---------- + +JXInput - Input Devices for Java +================ + + +Java as it comes in the common distribution does not provide any means to access typical gaming devices like joysticks, gamepads and such. + +But many people out there are actually using Java for writing games! Imagine a flight simulator without a joystick, a sports game without a gamepad, a racing game without a steering wheel. + +For the Java community is typically very active I was wondering whether there are not [zillions](http://www.hardcode.de/jxinput/jxlinks.html) of extensions contributed by the community. Well, I found a few, but none of them reflected the complexity and the possibilities of state-of-the-art input devices we find today. + +## Technique ## + +As long as JXInput is used in a way that it just uses common Java features (see KeyboardDevice/VirtualDevice), JXInput is a 100% pure Java library. + +But for Java does not support joysticks in a portable fashion, the binding to physical devices has to be done in a platform dependent manner. So system specific libraries come into play and the 100% pure Java beauty is gone. This also means that applications using JXInput then cannot be simple Applets, but always have to take precauti[ons concerning download, installation and security. ](http://www.java.sun.com/cgi-bin/javawebstart-platform.sh?)Sun's WebStart technology is a suitable mechanism to bring even these kind of libraries to the people at home. + +The current implementation connects to devices using Microsoft DirectInput (DirectX8) and reflects the features, but not the design of that commonly used library. +This may be extended in the future, because the design of the package is not Win32 specific and it should be quite easy to add other native support libraries e.g. for Linux or MacOS. + +For the platforms that cannot be supported by the DirectInput binding such as MacOS or Linux, JXInput offers means to query the Swing keyboard an emulate the desired joystick functions. + +BTW, the native Win32 library works standalone as well providing an easy-to-use wrapper around DirectInput devices. + +![](architecture.gif) + +## Features ## +JXInput gives access to any number of DirectInput gaming devices - although it seems to be quite unusual to have more than one connected. +Additionally, JXInput allows to interpret each key on the keyboard as interpreted by Swing to be a JXInput button. This gives another source for about 100 additional buttons. + +For computer without a phyisical joystick attached, JXInput offers the possibility to emulate 'virtual' joystick axes with help from a set of buttons. So it is very easy to use a 'virtual' joystick by using the e.g. the cursor keys. + +For each device, the following features are supported: + +- 6 axis (3 translational, 3 rotational) +- 2 sliders +- 4 directional devices; coolie hats +- 256 buttons + +JXInput allows to ask for the features available with a given device and later to query their respective values. This is the way most games work, polling the state of the inputdevice within a loop. + +For event driven applications, JXInput allows to register 'listener' objects with the features. This way, the application is called back by JXInput in case the input device changes it's state. + +There also is a third mode of operation allowing JXInput to be used with Java3D. In order to be able to work in a Java3D environment, JXInput implements the predefined interface javax.media.j3d.InputDevice. So JXInput can be added to existing Java3D projects without breaking the code. + +## Performance ## + +JXInput uses JNI (Java Native Interface) to access the native library. JNI is not known to be too fast, so the number of calls has been minimized: 1. The polling of the devices state is managed by JXInput in a single JNI call. +Another possible performance drain is the allocation and deallocation of objects. Therefore, after being setup, JXInput does no longer create any objects at all. \ No newline at end of file diff --git a/www/images/jxinput_architecture.gif b/architecture.gif similarity index 100% rename from www/images/jxinput_architecture.gif rename to architecture.gif diff --git a/www/.cvsignore b/www/.cvsignore deleted file mode 100644 index a46c908..0000000 --- a/www/.cvsignore +++ /dev/null @@ -1,5 +0,0 @@ -.nbattrs -*~ -javadoc - - diff --git a/www/hardcode.gif b/www/hardcode.gif deleted file mode 100644 index de640ec..0000000 Binary files a/www/hardcode.gif and /dev/null differ diff --git a/www/images/dl-javawebstart3.jpg b/www/images/dl-javawebstart3.jpg deleted file mode 100644 index 2c1420d..0000000 Binary files a/www/images/dl-javawebstart3.jpg and /dev/null differ diff --git a/www/images/download-button.gif b/www/images/download-button.gif deleted file mode 100644 index b815543..0000000 Binary files a/www/images/download-button.gif and /dev/null differ diff --git a/www/images/download.j2se14.gif b/www/images/download.j2se14.gif deleted file mode 100644 index cf0bad6..0000000 Binary files a/www/images/download.j2se14.gif and /dev/null differ diff --git a/www/images/downloadj3d.gif b/www/images/downloadj3d.gif deleted file mode 100644 index 4e0536a..0000000 Binary files a/www/images/downloadj3d.gif and /dev/null differ diff --git a/www/images/footpedal-pic.gif b/www/images/footpedal-pic.gif deleted file mode 100644 index e627bf7..0000000 Binary files a/www/images/footpedal-pic.gif and /dev/null differ diff --git a/www/images/getjavanow.gif b/www/images/getjavanow.gif deleted file mode 100644 index bbf6f3e..0000000 Binary files a/www/images/getjavanow.gif and /dev/null differ diff --git a/www/index.htm b/www/index.htm deleted file mode 100644 index d1734ed..0000000 --- a/www/index.htm +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - -JXInput - Gaming Input Devices (joystick/gamepad/DirectInput) for Java - - - - - - -Joystick Java Gamepad DirectInput JNI - - diff --git a/www/jnlp/JXInput.jar b/www/jnlp/JXInput.jar deleted file mode 100644 index f2cff97..0000000 Binary files a/www/jnlp/JXInput.jar and /dev/null differ diff --git a/www/jnlp/JXInputKeystore b/www/jnlp/JXInputKeystore deleted file mode 100644 index 0ed7755..0000000 Binary files a/www/jnlp/JXInputKeystore and /dev/null differ diff --git a/www/jnlp/jxinput.dll b/www/jnlp/jxinput.dll deleted file mode 100644 index 8ff71f9..0000000 Binary files a/www/jnlp/jxinput.dll and /dev/null differ diff --git a/www/jnlp/jxinputdll.jar b/www/jnlp/jxinputdll.jar deleted file mode 100644 index 0436405..0000000 Binary files a/www/jnlp/jxinputdll.jar and /dev/null differ diff --git a/www/jnlp/jxinputtestdialog.jnlp b/www/jnlp/jxinputtestdialog.jnlp deleted file mode 100644 index bcf5d9d..0000000 --- a/www/jnlp/jxinputtestdialog.jnlp +++ /dev/null @@ -1,28 +0,0 @@ - - - - JXInput Test Dialog - HARDCODE Development - - Demonstration of JXInput - A Test Dialog - - - - - - - - - - - - - - - - - - diff --git a/www/jnlp/sign.bat b/www/jnlp/sign.bat deleted file mode 100644 index 0ca94fc..0000000 --- a/www/jnlp/sign.bat +++ /dev/null @@ -1,8 +0,0 @@ -rem keytool -genkey -alias jxinput -keypass jxinput -keystore JXInputKeystore - -set PATH=c:\j2sdk1.4.1\bin;%PATH% -copy /Y ..\..\Distribution\0.3\JXInput.jar . -copy /Y ..\..\Distribution\0.3\jxinput.dll . -jar cf jxinputdll.jar jxinput.dll -jarsigner -keystore JXInputKeystore -storepass jxinput -keypass jxinput JXInput.jar jxinput -jarsigner -keystore JXInputKeystore -storepass jxinput -keypass jxinput jxinputdll.jar jxinput \ No newline at end of file diff --git a/www/jxdownload.htm b/www/jxdownload.htm deleted file mode 100644 index ec84e9b..0000000 --- a/www/jxdownload.htm +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - -Download - Gaming Input Devices (joystick/gamepad/DirectInput) for Java - - - - - - -

Download and Installation

-

-

- - -

Prerequisits

-

-In order to operate JXInput a Java Runtime Environment in version 1.3 or newer is needed. - -To compile the sourcecode, a corresponding JDK is useful for the Java source codes. The C++ -things have been developed with Microsoft Visual Studio 6.0. - -The Java technology may be downloaded here: - -

- - - - -
- - - - - - -
 Download J2SE 1.4 Now!Download
J2SETM v1.4 Now!
-
- - -

- - -Get Java Runtime -

- -Get Java Web Start NOW! -

- -Get Java3D -

- - - -

Download distribution

-

- -While downloading the package you agree with my -license agreement. -

-

-V0.3.3 runtime -
-V0.3.3 with source -
-

- - -

Installation

- -In order to operate, JXInput needs only two files. There is the file JXInput.jar that contains -the compiled Java classes and JXInput.dll holding the native code. -

-JXInput.jar has to be part of your CLASSPATH, JXInput.dll has to be in a place where Windows is -able to find it. I prefer to have the DLL just in the directory where the application starts. -

-Place both files into one directory and double-click JXInput.jar. If your JRE is setup -correctly, this should start an dialog showing what your inputdevice is able to perform. -This is a good and easy test to find out wether everything is fine with JXInput. - - - - -

Older versions:

- -
-V0.2.0 runtime -
-V0.2.0 with source -
-

-

-V0.1.0 runtime -
-V0.1.0 with source -
-

- - - - diff --git a/www/jxinput_in_space/abstract.pdf b/www/jxinput_in_space/abstract.pdf deleted file mode 100644 index 152039c..0000000 Binary files a/www/jxinput_in_space/abstract.pdf and /dev/null differ diff --git a/www/jxinput_in_space/canadarm2_training.jpg b/www/jxinput_in_space/canadarm2_training.jpg deleted file mode 100644 index f67e68f..0000000 Binary files a/www/jxinput_in_space/canadarm2_training.jpg and /dev/null differ diff --git a/www/jxinput_in_space/index.htm b/www/jxinput_in_space/index.htm deleted file mode 100644 index 008ed70..0000000 --- a/www/jxinput_in_space/index.htm +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - -JXInput - Gaming Input Devices in space! (joystick/gamepad/DirectInput/Java) - - - - - -

-

JXInput - now in space on the ISS!

- -
-

-JXInput found it's way to the ISS (International Space -Station). There, it -allows a Java-written simulation program to connect to the custom input device -used by the astronauts to control the robot -Canadarm2. - -

-

-
-
- - -

-the device -
-

- -

-simulation running -
-

- -

-from ISS presskit -
-

- - - diff --git a/www/jxinput_in_space/smp_hardware_components.jpg b/www/jxinput_in_space/smp_hardware_components.jpg deleted file mode 100644 index eeaffe8..0000000 Binary files a/www/jxinput_in_space/smp_hardware_components.jpg and /dev/null differ diff --git a/www/jxinput_in_space/smp_simulation_running.jpg b/www/jxinput_in_space/smp_simulation_running.jpg deleted file mode 100644 index 9802406..0000000 Binary files a/www/jxinput_in_space/smp_simulation_running.jpg and /dev/null differ diff --git a/www/jxlicense.htm b/www/jxlicense.htm deleted file mode 100644 index ae69409..0000000 --- a/www/jxlicense.htm +++ /dev/null @@ -1,53 +0,0 @@ - - -JXInput - License Agreement - - - - - - - - -

- -

JXInput - License Agreement - Gaming Input Devices (joystick/gamepad/DirectInput) for Java

-

- -IF YOU DO NOT AGREE TO THE TERMS OF THIS AGREEMENT, DO NOT USE THIS SOFTWARE! -

-

-Software is copyrighted. JXInput software is the intellectual property of HARDCODE, - http://www.hardcode.de, - Dipl. Phys. Joerg Plewe, Muelheim, Germany. The author retains the copyright, title and ownership -of the provided software. -

-The provided software may be used and redistributed in non-commercial applications. -The right is limited to the current version of the software and does not include -the right to upgrades, updates or further developed versions.
-

-Commercial use of the provided software requires licensing. Licenses can be requested -by mail to jxinput@hardcode.de. -

-You are not permitted to sell, lease, decompile or modify the JXInput module -provided in jxinput.jar/jxinput.dll without the permission of the author. All open code -(Java/C++ files) is public domain and can be used without any restrictions.
-

-JXInput SOFTWARE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY OR LIABILITY. -THE ENTIRE RISK AS TO THE RESULTS OF THE USAGE OF THE SOFTWARE IS ASSUMED BY -YOU. -

- -Conditions for redistribution of the provided software in non-commercial applications: -