Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (516)
Games in Android Showcase (123)
games submitted by our members
Games in WIP (577)
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  
  Joysticks Applets Javascript I need some advice  (Read 969 times)
0 Members and 1 Guest are viewing this topic.
Offline MikoLone

Junior Newbie





« Posted 2005-09-06 17:03:37 »

What's up,

I am new to all of this and I need some advice.  I need to be able detect and use a joystick in an applet but pass the pull events to javascript/flash.  I have something that does this already but it only works on PCs and only in IE (active x).  I was thinking that using java it would take care of my platform/browser problem.  So the questions I have are... well I have a bunch.

1.  Is it possible to send variable from applets to javascript/actionscript
2. What API should I use? Jinput, java3d, etc
3.  Will the clients have to have special components installed?
4. Which one will support serial/ paralel and usb joysticks?
5. Where can I find some code snippets to try this out.

Thanks in advance for any information that you post. 
Offline Alan_W

JGO Knight


Medals: 8
Projects: 3


Java tames rock!


« Reply #1 - Posted 2005-09-06 20:21:53 »

1. Yes
2. Jinput
3. Yes, and here's the problem. There's no way to automatically install the required native library using an applet.  You could try signing the applet, streaming the native code to disc, but trying to get java to recognise it as a valid extension is a problem.
4. See 2. (don't think it does parallel though)
5. You probably won't find code for jinput & java/javascript all in one code snippit.  I'd look in the Jinput forum. I believe there's an article about java/javascript communication on the sun website somewhere.
- try "java javascript communication" in google
- there are some tests in net.java.games.input.test  package of jinput
Alan

Time flies like a bird. Fruit flies like a banana.
Offline endolf

JGO Coder


Medals: 7
Exp: 15 years


Current project release date: sometime in 3003


« Reply #2 - Posted 2005-09-06 21:08:05 »

4. Under windows, if directx picks it up, jinput can use it
    Under Linux, if there are js* or event* nodes in /dev/input then it will (should) work
    Under mac, it's all a little dubious, we have no active osx jinput developers right now.

If you need JInput help, then i sit on that forum, i'm no javascript expert though i'm afraid.

Endolf

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

Junior Newbie





« Reply #3 - Posted 2005-09-06 21:46:16 »

Thanks for the help/advice.  I have been looking into Java3d all day and I couldn't really find anything. 

Here is a good tutorial I found on jinput. 
https://freefodder.dev.java.net/tutorial/jinputTutorialOne.html

Where can I get some more information about #3?

"3. Yes, and here's the problem. There's no way to automatically install the required native library using an applet.  You could try signing the applet, streaming the native code to disc, but trying to get java to recognise it as a valid extension is a problem."

Does this mean that even if the JRE is installed on the computer, the jinput stuff will not work?  I am a real newbie and I am not even sure what you mean by native library.  Would the users have to download a special library, put it in their java folders, change the class path, and a bunch of other stuff to get it to work?  Is it going to be worth trying?

Thanks a lot for the responses.

Offline endolf

JGO Coder


Medals: 7
Exp: 15 years


Current project release date: sometime in 3003


« Reply #4 - Posted 2005-09-09 11:46:46 »

Hi

There have been a couple of changes in the API since then, the idea being to make jinput easier to use. I'll see if I can sort out getting the tutorial updated and/or placed in the jinput project.

Jinput uses a native library for each platform it runs on, this is because java itself has no exposed knowledge of direct input under windows, or the the event kernel interface under linux etc. So JInput has had to implement it's own access to these to expose the devices. Using a downloaded application with it's own installer, or using Java WebStart these native libraries are not an issue (see the jinput webstart demo). Using applets is harder though.

I've not done applets/flash much at all so I can't help on that front. If you are determined to use javascript and flash then you'll have to hope someone else can help. If you are happy using webstart to distribute your application, then pop on over to the jinput topic on these forums and we can get you up and running.

Endolf

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

TehJavaDev (32 views)
2014-10-27 03:28:38

TehJavaDev (26 views)
2014-10-27 03:27:51

DarkCart (41 views)
2014-10-26 19:37:11

Luminem (22 views)
2014-10-26 10:17:50

Luminem (27 views)
2014-10-26 10:14:04

theagentd (33 views)
2014-10-25 15:46:29

Longarmx (61 views)
2014-10-17 03:59:02

Norakomi (58 views)
2014-10-16 15:22:06

Norakomi (47 views)
2014-10-16 15:20:20

lcass (43 views)
2014-10-15 16:18:58
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
java-gaming.org 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‑gaming.org
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!