Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (710)
Games in Android Showcase (212)
games submitted by our members
Games in WIP (784)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Java Game APIs & Engines / JInput / Re: JInput not working correctly in applets on: 2009-03-23 15:58:42
Is the JInput API really unstable? I would hope that if major, incompatible changes were ever made to the JInput API, then it would be given a new package name so as not to clash with the previous version. If there is no goal to do this, then I suppose (1) is a valid point.

However are you sure about (2) and (4)? I have verified that the native libraries do get loaded from lib/ext, even from an unsigned applet.
2  Java Game APIs & Engines / JInput / Re: JInput not working correctly in applets on: 2009-03-23 10:38:01
If the JInput jar is placed into lib/ext, isn't it automatically granted the privileges to access whatever it needs to access?
3  Java Game APIs & Engines / JInput / Re: JInput not working correctly in applets on: 2009-03-23 00:54:40
Hi endolf, I saw your resource loader before actually. It's really cool, nice job! And, it works. But... as I mentioned, I would like not to change my delivery mechanism.

Could it be that the reason your applet works has nothing to do with the resource loader (and would work just as well with lib/ext), and has more to do with the fact that your applet creates JFrames? Can you make a normal applet that runs entirely inside of the applet component and can poll the keyboard using JInput? This would correspond more to what I am hoping to achieve.

If I set the plugin to directx as you suggested, it is then possible to poll the keyboard from within the applet. This is great, except that in order to set the various properties, the applet must be signed, and this changes my delivery mechanism. I do not want users to have to click a button to trust this applet. Also, you mentioned that the directx plugin does not support multiple keyboards and mice. This is ok, but how about joysticks? I will eventually want to support a joystick inside the applet.

Ideally, JInput could be fixed to work inside an applet by default. Is this possible? Thanks again.
4  Java Game APIs & Engines / JInput / Re: JInput not working correctly in applets on: 2009-03-22 10:28:45
I'm also not running this code from a console, for me, I used it in an applet.

By the way, another option is to try the game to see if you get the same problem with my code:,lt,O,d/

The polled keys are: Z, X, Arrow keys and Space. You can press F9 *after* the game has started to see if JInput was detected by the applet (if it says "Direct", then it was detected).

When JInput is in lib/ext, keyboard input works on Linux, but not on Windows. When JInput is not in lib/ext, it works on all platforms using standard AWT events.

Thanks for looking into the problem.
5  Java Game APIs & Engines / JInput / Re: JInput not working correctly in applets on: 2009-03-21 23:59:21
If I print "Checking for events" just before the inner loop, the program shows that the outer loop is repeating regularly, so this is not it.

Also, if I use keyboard.isKeyDown(...) instead of events, this method always returns false on WINDOWS.

Were you able to reproduce the problem with the code I provided?
6  Java Game APIs & Engines / JInput / JInput not working correctly in applets on: 2009-03-21 16:05:28
I am developing an applet that will use JInput if it is present (in the user's "lib/ext" directory), or will otherwise fall back to standard java.awt techniques.

Here is the problem:

When JInput is detected on LINUX, keyboard events are detected fine, but mouse events are not.
When JInput is detected on WINDOWS, mouse events are detected fine, but keyboard events are not.

My game depends on keyboard input, so the second problem is worse for me.

Here is the code I'm using to see what events are being detected by JInput:

Controller[] controllers = ControllerEnvironment.getDefaultEnvironment().getControllers();
Event event = new Event();
while (...)
    for (int i = 0; i < controllers.length; i++)
        EventQueue queue = controllers[i].getEventQueue();

By printing out the array of controllers, I can also verify that a keyboard controller is found by JInput in both WINDOWS and LINUX, but it just doesn't do anything in WINDOWS.

I noticed that a similar problem was described in the thread "JInput and Java 1.6.0_10" although this might be a different problem because in my case there is evidence that things are at least "partially" working.

Is there a solution that doesn't fundamentally change the delivery approach of an applet loading JInput from lib/ext?

My LINUX Java version is 1.6.0_10-beta-b14 (but I unfortunately don't have the WINDOWS Java version at hand).

Thank you
Pages: [1]
theagentd (66 views)
2017-02-18 13:42:33

theagentd (71 views)
2017-02-18 13:35:16

h.pernpeintner (1235 views)
2017-01-24 22:39:11

h.pernpeintner (1223 views)
2017-01-24 22:38:32

Galdo (1775 views)
2017-01-12 13:44:09

Archive (1891 views)
2017-01-02 05:31:41

0AndrewShepherd0 (2427 views)
2016-12-16 03:58:39

0AndrewShepherd0 (2279 views)
2016-12-15 21:50:57

Lunch (2359 views)
2016-12-06 16:01:40

ral0r2 (2152 views)
2016-11-23 16:08:26
List of Learning Resources
by elect
2016-09-09 09:47:55

List of Learning Resources
by elect
2016-09-08 09:47:20

List of Learning Resources
by elect
2016-09-08 09:46:51

List of Learning Resources
by elect
2016-09-08 09:46:27

List of Learning Resources
by elect
2016-09-08 09:45:41

List of Learning Resources
by elect
2016-09-08 08:39:20

List of Learning Resources
by elect
2016-09-08 08:38:19

Rendering resources
by Roquen
2016-08-08 05:55:21 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‑
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!