Open grawin opened 10 years ago
On Mon, Mar 3, 2014 at 9:22 AM, Ryan Grawin notifications@github.comwrote:
Should be able to handle using any type of game pad using the LWJGL. The Xbox controller code uses a somewhat obscure 3rd party library that only works in Windows. It would be best to use a single "generic" library to handle the controllers. Aside from swapping Xbox to that library the game should be able to detect / setup any semi-standard controller.
— Reply to this email directly or view it on GitHubhttps://github.com/mitch3a/SuperMarioWar/issues/8 .
The one for the SNES controller is a "generic" library. The Xbox one is the problem (I picked something that was easy to use just to get it up and running following an example I found).
Now that we're a little bit smarter, I think it would be better to use the LWJGL to handle controller input. That way it will be less specialized and work on any computer (I think). http://www.lwjgl.org/javadoc/org/lwjgl/input/package-summary.html
If it sort of just "does everything for you" then im for it. Then again, this is all java so "everything is pretty much already done for you" haha. The only two counter-arguments i have 1. sometimes setting up something built in can be a pain and 2. some packages can be buggy, or missing functionality, etc. vs having full control of your own. That said, I haven't really looked into that library (or the one i started with) so for all i know this one is the standard and does everything you want very simply.
I think this should be a major chunk of the 0.2 version.
On Mon, Mar 3, 2014 at 9:34 AM, Ryan Grawin notifications@github.comwrote:
The one for the SNES controller is a "generic" library. The Xbox one is the problem (I picked something that was easy to use just to get it up and running following an example I found).
Now that we're a little bit smarter, I think it would be better to use the LWJGL to handle controller input. That way it will be less specialized and work on any computer (I think). http://www.lwjgl.org/javadoc/org/lwjgl/input/package-summary.html
— Reply to this email directly or view it on GitHubhttps://github.com/mitch3a/SuperMarioWar/issues/8#issuecomment-36514906 .
Right, it's not an easy change. It will be broken into a couple parts anyway. The initial rev would just be to get the Xbox controller using it. Then move other things over. I did some research and it seems to be very stable and sort of the "de facto" library for doing games in plain Java and provides controller interfaces. (I think our Sound System library uses parts of LWJGL too)
I guess we could have a config file with known settings, if that doesn't exist try to auto detect things, and offer a way to change the controls in the menu (once those exist). Sounds trivial, but it's kind of not.
Should be able to handle using any type of game pad using the LWJGL. The Xbox controller code uses a somewhat obscure 3rd party library that only works in Windows. It would be best to use a single "generic" library to handle the controllers. Aside from swapping Xbox to that library the game should be able to detect / setup any semi-standard controller.