Update README.md

Updated the README for version 1.1.0.
This commit is contained in:
Markil3
2020-12-19 00:58:18 +00:00
committed by GitHub
parent 126a2e844d
commit a42d7f4597

View File

@@ -1,8 +1,14 @@
# JMEControllerConfig
Derived from jMonkeyEngine's TestJoypad example, this is a simple utility library for JMonkeyEngine-based games that allow for the inclusion of a gamepad view to monitor how exactly the JMonkeyEngine is viewing the gamepad. It can easilly be implemented into any JME3-based application without the need for external dependencies.
Derived from jMonkeyEngine's TestJoypad example, this is a simple utility library for JMonkeyEngine-based games that allow for the inclusion of in-game utilities to manage and configure game controllers in your game. The library can easily be implemented into any JME3-based application without the need for additional dependencies besides what you likely already have.
There are two screens included in the library. The JoystickPreviewScreen state will display the controllers currently connected to the computer (and update it as controllers are connected and disconnected on properly configured applications), as well as the values of all their inputs.
The CalibrateInputScreen state will show a series of prompts that will guide users through the process of creating a controller remapping properties file compatible with com.jme3.input.JoystickCompatibilityMappings.
## Getting started
Download the [latest release build](https://github.com/Markil3/JMEControllerConfig/releases) and store it in your project's library folder. Point your build tool to use the library. Then, ensure that your jMonkey application's settings (com.jme3.system.AppSettings#setUseJoysticks) are set to enable joypad support After that, just attach the markil3.controller.JoystickPreviewScreen to the jMonkey applications state manager to display the gamepad information. Simply detach the state to remove the information.
Download the [latest release build](https://github.com/Markil3/JMEControllerConfig/releases) and store it in your project's library folder. Point your build tool to use the library. Then, ensure that your jMonkey application's settings (com.jme3.system.AppSettings#setUseJoysticks) are set to enable joypad support After that, just attach the markil3.controller.JoystickPreviewScreen to the jMonkey applications state manager to display the gamepad information, or attach CalibrateInputScreen with a link to the output file to configure gamepads. Simply detach the state you used to remove the information.
If you need examples as to how to implement these, see the :desktop submodule.
### Requirements
* Java 8+
@@ -13,6 +19,8 @@ Download the [latest release build](https://github.com/Markil3/JMEControllerConf
* "Interface/Joystick/gamepad-stick.png" from jme3-testdata
* jme3-desktop (if running as standalone)
* jme3-lwjgl3 or jme3-lwjgl (if running as standalone)
* jme3-android (if running on Android)
* jme3-android-natives (if running on Android)
* slf4j-api 1.7.15+
## Building from Source
@@ -31,15 +39,11 @@ This will create three .jar files in the library/build/libs directory, one binar
## Testing
If you want to test this without implementing it in your software, simply download the source as outlined above and run
<code>gradlew run</code>
<code>gradlew desktop:run</code>
This will run a bare-bones version dedicated to the utility.
This will run a bare-bones version dedicated to the utility using LWJGL3.
## FAQ
### Can I use this library in Adroid/iOS?
While I haven't fully tested it out, I foresee no problems. Just be sure to enable joysticks.
Note that on Android at least, the accelerometer is treated as gamepad 0.
Alternativly, you can use the :desktopLegacy subproject for LWJGL2, or the :android subproject for testing on Android.
## Troubleshooting
@@ -47,7 +51,7 @@ Note that on Android at least, the accelerometer is treated as gamepad 0.
There are two reasons that nothing would show up. First of all, the application state simply may not be attached properly to the state manager. Use a debugger to check this. Second, the application state may not detect any controllers in the com.jme3.input.InputManager#joysticks array. Ensure that your gamepads are connected and are registering in jMonkeyEngine.
### Every time I disconnect a controller, its entry is still present in the tab bar
This is a result of the controller disconnect callback being called before the controller is actually removed from the engine.
This is a result of the controller disconnect callback being called before the controller is actually removed from the engine. This is a limitation of the jMonkey API.
### My application crashes every time I attach it!
Be sure to enable joystick support in the application settings.
@@ -63,3 +67,12 @@ Be sure to enable joystick support in the application settings.
app.setSettings(settings);
app.start();
}
### Connecting/Pressing some buttons on Android causes crashes
Support for gamepads on Android appear to be a little spotty. This again is a limitation of the jmonkey engine. https://github.com/jMonkeyEngine/jmonkeyengine/issues/1448
### Some buttons show up under two mappings
This is a quirk with some gamepads. At the moment, this can interfere with the automapper. Workarounds are forthcoming.
### The triggers are always active during remapping
Many triggers are set to -1.0 in their default position. This can sometimes cause confusion to the automapper. Workarounds are forthcoming.